Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   local. strings? (https://forums.graalonline.com/forums/showthread.php?t=70653)

contiga 12-08-2006 06:35 PM

local. strings?
 
Works:
PHP Code:

setstring local.weapon,fishingrod;
initWeapon(); 

Doesn't work:
PHP Code:

local.weapon "fishingrod";
initWeapon(); 

(At Stefan, see +FishingRod on Debug)
Anyone has an explaination?

Loakey_P2P 12-08-2006 07:54 PM

ive had that type of problem before but i dont remmber how i managed to fix it . at one time i had string's that wouldnt set unless i did it the old way couse the new one wouldnt work .


old example * setstring string,value;

new example * this.string = "value";

but id bet your too good to make the mistake of setting a string on the wrong side (client/server) . i think i may have solved the problem by deleteing the npc .

contiga 12-08-2006 08:08 PM

Quote:

Originally Posted by Loakey_P2P (Post 1251501)
old example * setstring string,value;

new example * this.string = "value";

Ghehe, yeah I knew that >_< Skyld already thought it had to do with the Engine.. which I agree with. So I guess Stefan can only fix it. ;)

Gambet 12-08-2006 10:07 PM

What exactly doesn't work? When I set a local variable, it sets correctly.

contiga 12-08-2006 11:24 PM

Quote:

Originally Posted by Gambet (Post 1251519)
What exactly doesn't work? When I set a local variable, it sets correctly.

It sets local.* to something, and when doing player.chat = local.*; it also shows what it's set to.. but it can't be read by multiple NPC's.. (a joined class in this case). I have to use setstring local.*,foo; for that (the GS1 ****).

Admins 12-09-2006 02:36 AM

All variables set with setstring that don't have a special leading (this., thiso., server., serverr.) are added to the player (like in GS1), so you need to do
PHP Code:

player.local.weapon "fishingrod"

to stay compatible with the current scripts.

contiga 12-09-2006 07:36 PM

Quote:

Originally Posted by Stefan (Post 1251583)
All variables set with setstring that don't have a special leading (this., thiso., server., serverr.) are added to the player (like in GS1), so you need to do
PHP Code:

player.local.weapon "fishingrod"

to stay compatible with the current scripts.

Problem solved, thanks!


All times are GMT +2. The time now is 09:20 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.