![]() |
Tokenize problems for guild script
In the following script I am making a guild maker. The set command works but it is overwritten by the next tokenize. When I say '/set something' it says
'set to something'. But when I say '/add JohnGames' it says 'You have been added to Johns Free home system! Your house number is 'JohnGames'. I want it to keep the tokens seperate. NPC Code: |
Read the rule thing jagen posted. It must be in code tags or whatever and use the graal standard thingys. I'm not sure but I think it's something like
NPC Code: |
Try saying /add 1 JohnGames and it will work. Also if you want a suggestion, make sure to the system be more secure, like checking if the house number will be > 0, tokenscount > 2 and so. ^^
|
Quote:
|
if you need to hold information from a tokenize, create a new string/variable from that token, don't rely on the #t's (same goes with the #p's)
|
Quote:
Thank you for the hint. THank you people who script mostly. I never us the file commands except if. (maybe I should start using them) |
Quote:
|
Quote:
|
Quote:
Also, I'm pretty sure that #t's are read-only. So the only thing that can assign new values to them is a call to tokenize. |
Quote:
The script call is over when I call it again as something new; so it went away |
What I said isn't needed in the little snippet he gave, but I was really just refering to the general case. Osrs already pointed out the answer to his primary dilemma.
You can't lose them instantly without tokenizing something else (tokenize isn't local, so holding something for longer than one block of code isn't secure), same goes for parameters (#p) but more than one command will assign information to those. |
Quote:
|
If is not a command
|
Quote:
|
Quote:
|
Quote:
|
You guys know what he means, why must you act like asses?
|
Quote:
|
Quote:
JohnGames: are you talking about commands.rtf, npcprogramming.doc, or what? |
He's talking if () {}
|
Quote:
|
Quote:
|
Man, you really need to learn some type of terminology.
|
Quote:
|
| All times are GMT +2. The time now is 01:25 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.