Non-threaded
Forums
»
Advanced Editor Forum
»
Read Thread
Get help from the experts on variables, scripts, items, and other scary things.
Mizal
Reply
Math is hard
7 years ago
This was supposed to be something quick and simple to play around with this morning, and instead I'm just utterly stumped here.
What I have is essentially:
%RNG := 30D3
%NEWSTUFF := %NEWSTUFF + %RNG
in one link. Another link is supposed to collect the total until you clean it out, so in there I have:
%TOTALSTUFF := %TOTALSTUFF + %NEWSTUFF
some unrelated things, and then at the end:
%NEWSTUFF := 0
I thought if anything I'd have some trouble with resetting %NEWSTUFF at the end, but instead for no reason I can understand, every time I go to collect the total, it doubles it. Like, start with a total of zero, collect 64 new stuff, and I then have 128. Do it again and I have 256. There's only two links effected here and I've been switching back and forth staring at them for awhile now and I just don't know what the fuck.
Mizal
Reply
Math is hard
7 years ago
Okay so apparently what I needed to do was clear the random variable immediately after clicking the first link, because for whatever reason clicking
any other link
on the page would continue to increase it which would continue to increase the other total.
This makes no sense and I am very annoyed. It also means I have to go in an unfuck a whole bunch of $PAGETEXT stuff that was spitting out the random variable, and there's another bit that was using a similar system that's going to be more complicated to test, but is probably also broken in the same way.
Ogre11
Reply
Math is hard
7 years ago
Was the code in the link itself?
Mizal
Reply
Math is hard
7 years ago
Yes, but clicking other, empty links that refreshed the page still triggered it.
The whole game was just something I was toying around with so it's not actually that big a deal. I may go back in and try to pinpoint exactly what was going on with it but it won't be before the weekend.
Home
Storygames
Random
Search
Newly Created
Top Rated
Fantasy
Grimdark Fantasy
Sci-Fi
Modern
Horror
Love & Dating
Mystery / Thriller
Family Friendly
Historical
Puzzles / Games
Edutainment
Fan Fiction
Forums
Newbie Central
The Lounge
News & Updates
The Parlor Room
Creative Corner
Writing Workshop
Reading Corner
Adv. Editor Forum
Wishing Well
Bugs and Problems
My Stuff
Storygames
Pictures
Messages
Notifications
Duels
Saves
Comments
Points
Commendations
Notepad
Profile
View Profile
Help & Info
CYOA History
About Us
Privacy Policy
Terms Of Service
Logon
version 23.22 | ChooseYourStory © 2001 - 2025, Halogen Studios Entertainment |
contact us