![]() |
deletestring (serverside)
Quote:
Now I have to use this: NPC Code: I don't know whether it is working clientside/offline. |
...you're starting at the highest index and working down, right?
Otherwise you're gonna skip every other index... Delete 0 Index 1 becomes Index 0, 2 becomes 1, etc. Delete 1 (formerly index 2...) Delete 2 (formerly index 4...) |
Quote:
Do you mean that I used deletestring the wrong way? I didn't even use it in a loop. Are you talking about the script I am using as replacement? I just copied every thing else into another string. |
I am using deletestring for many things and its working, can you post some code example?
|
I don't want to publish it here.
It is on Classic Developement, Weapons, -System/Trading. I have put "//" in front of the deletestring command. The following six lines are what fixed it. (I rescripted the deletestring command). |
Quote:
|
Quote:
|
Arg you are using 'temp' ? that will send a lot of data to the player x-x And it still doesnt tell me what should be wrong. A code example of the bug would be good
|
Quote:
|
Quote:
|
Quote:
Tyhm told me sometime that only LATs are allowed to see the scripts used on Classic, so I won't post it here, but, like I wrote before, you can look at it on Classic Developement, it's in the -System/Trading weapon. (I tried sending it to you using a PM, but it was 10 times too huge for a forum PM). However, this is a very short version of it: NPC Code: Quote:
|
Quote:
|
Quote:
And: NPC Code: |
Personally I just wouldn't use a string array, though it depends on how many of each hat you want to allow people to have. If you use ascii() and #K() then you can compact numbers over a fairly large range into a single byte, and then just use a normal string with one character per hat.
|
Variables like hatnum are local, belonging to the current script, so you can use hatnum like you have written, and it works. You have problems when calling functions of joined classes, because those don't know of the local variables of the other script.
|
I will update & restart the npcservers on that machine, it seems to be quite buggy (the weapons are not saved).
|
Quote:
|
Quote:
Quote:
But here I am not calling a joined function. Here it looks like deletestring is always deleting number zero, no matter what I command it to delete. I will test what happens when I enter a constant number to deletestring. Maybe it is just bugged when using variables. Though I doubt it. |
Quote:
|
*reviving the thread*
It's bugged again!!! |
| All times are GMT +2. The time now is 04:48 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.