PSEUDORANDOM issues in 1.3.3 [fixed]
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
PSEUDORANDOM issues in 1.3.3 [fixed]
Trying to convert some stuff over to 1.3.3, I'm having trouble with the PSEUDORANDOM macros.
This:
Will yield values all over the place ("33608..."). I'm still doing all the initialising as normal (I know how to use this).
Has anyone else had problems? Is there anyWML-related change that could break PSEUDORANDOM?
This:
Code: Select all
{PSEUDORANDOM 5}
Has anyone else had problems? Is there anyWML-related change that could break PSEUDORANDOM?
Last edited by Rhuvaen on June 18th, 2007, 4:27 pm, edited 1 time in total.
Try some Multiplayer Scenarios / Campaigns
I've seen this problem too, and notified EP from IRC (since he's the author) and this happens since 1.3.2.
I have no idea about what does break PSEUDORANDOM and didn't have time to look more closely what is wrong with PSEUDORANDOM and wesnoth >1.3.1.
I have no idea about what does break PSEUDORANDOM and didn't have time to look more closely what is wrong with PSEUDORANDOM and wesnoth >1.3.1.
"Ooh, man, my mage had a 30% chance to miss, but he still managed to hit! Awesome!"
-- xtifr

i tried it with 1.3.2, but it doesn't work to me, too. it returns strangely numbers instead the right ones. i don't know how the macro works, so i gave up.
i'm using random, which works nice, if you don't use it in multiplayer. so i just go on making my (multiplayer) map and hope it will work on 1.4.
but it would be really great if someone found the pseudo-bug.
i'm using random, which works nice, if you don't use it in multiplayer. so i just go on making my (multiplayer) map and hope it will work on 1.4.
but it would be really great if someone found the pseudo-bug.
aka mysticspiral
Pah - I just remembered that I found that bug some time ago and fixed it, then lost that code and forgot about it...
You just need to replace all references of modx-{macro argument} with modx_{macro argument} (there are only two). Having a dash as part of the variable name was dodgy before, but now it is a downright bug.
I'm not even sure, but WML might have become smart enough to do a subtraction there?
I'll update the wiki macro code.
You just need to replace all references of modx-{macro argument} with modx_{macro argument} (there are only two). Having a dash as part of the variable name was dodgy before, but now it is a downright bug.

I'm not even sure, but WML might have become smart enough to do a subtraction there?

I'll update the wiki macro code.
Try some Multiplayer Scenarios / Campaigns