![]() |
Script not working
I know this isn't what you wanted to see, but anyway, whats wrong with this shop script?
NPC Code:// NPC made by Excaliber |
HTML Code:
strtofloat(#s(serverr.thundershotstock>0))Perhaps you mean: HTML Code:
strtofloat(#s(serverr.thundershotstock)) > 0Also, please name your threads better. Thank you! |
Thanks, I guess when you're looking at it you miss the easy stuff :\ Thanks though ^^
|
You're welcome.
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
I honestly dont see why you used triggeraction, it's not required when the same variable is triggered anyway with playerchats..
|
also setting a serverr.string to 0 will delete the string
since 0 is the same as null. I learned this the hard way with my custom hp system. you can substitiute and test for the word "none" i suppose though gs2 (if you convert the script) may want a "string" to look like that an int/floats to have no quotations. hm i see the point of my post has past so i will stop. |
Yeah, but when it's 0, and deleted, it's still read as 0, which is okay. Also, when the script needs the string again, it is recreated, so it's not a problem. And the triggeraction is there so I can get the player's account as #p(0). Eh, it's secure, and it works fine now :)
|
Why would you want #a as #p(0)?
|
Quote:
|
Quote:
I do that too. It seems logical that if you're running a script serverside it shouldn't be able to know tha value of #a since it's not running on the client. How would you know who called the serverside function? Although i've since realised you can use #a serverside... but i don't understand why. |
Quote:
|
Quote:
|
Quote:
|
Quote:
Anyway, don't trust the client to send the right parameters like that (unless you really want trainer users to be able to trigger that action for any player). |
So i've done some testing, it seems that on a gs2 enabled server, setting a serverr string to zero does destroy the string, although not entirely. There is still somewhat of a reminant of the string. Example:
NPC Code: Notice the difference between the last two? Of course, in gs2, a string can be treated as a float and vice-versa so it doesnt really matter. |
| All times are GMT +2. The time now is 06:22 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.