Official ScriptUO EasyUO Scripts > Scripting Chat
Boolean information for 12X
TrailMyx:
I answered your question in the chat box @ WinUO regarding booleans, but I got yapping and ate the response:
--- Quote --- It returns EUOs implementation of a boolean. #FALSE = 0 and #TRUE = -1
So your example "if ! #RESULT" would be true
--- End quote ---
I hate the chatbox for this reason. Good information gets forgotten.
Masscre:
I second that about the chat box trailmyx. I always look at it but only ever can find 1/4 of the good info then it is like puzzle tryign to put back together everything.
12TimesOver:
I just caught it but thanks for this follow-up here as well!
After seeing your response I figured out what I was doing wrong and had to laugh. Here's an example, see how quickly you figure it out. It is looking for a mapmakers pen in the pack, if none found it gosubs to a restock sub, if no pens are found in the resource container it returns #FALSE, if it returns #FALSE it should display a message and halt. The message and halt wouldn't display:
--- Code: ---gosub restock Pens
if ! #RESULT
display message and halt
else
return to main loop
sub restock
find pens
if not found
return #FALSE
else restock pens
return
--- End code ---
How quickly can you find my stupid mistake lol?
XII
TrailMyx:
I can't see it. Does it come through in your psudocode?
Masscre:
sub restock
is this it 12x?
Navigation
[0] Message Index
[#] Next page
Go to full version