Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   command format (https://forums.graalonline.com/forums/showthread.php?t=71051)

Loakey_P2P 12-27-2006 10:52 PM

command format
 
im having problems with the format of a string . its for an inventory to break them down into different sections . i already have the buttons and all that done but the part to only show npcs starting with a certain name .

if (player.weapons[ i].name.starts("Q/"SPC thiso.selec SPC"/"))

this.selec is the varable that cointains the middle part of the npc name . which would be either Item , Spell , Prize or Weapon . but it wont show those npcs , ive tracked it down to this . any idea's ?

xXziroXx 12-27-2006 10:58 PM

Quote:

Originally Posted by Loakey_P2P (Post 1257921)
im having problems with the format of a string . its for an inventory to break them down into different sections . i already have the buttons and all that done but the part to only show npcs starting with a certain name .

if (player.weapons[ i].name.starts("Q/"SPC thiso.selec SPC"/"))

this.selec is the varable that cointains the middle part of the npc name . which would be either Item , Spell , Prize or Weapon . but it wont show those npcs , ive tracked it down to this . any idea's ?

SPC = space, so its searching for a weapon naped "Q/ whatever /", use @ instead.

Yen 12-27-2006 10:59 PM

You confuse me.
I'm guessing this is your problem..
The SPC operator adds a space. So, it would look for Q/ Spell /
I'm assuming what you want is Q/Spell/, in which case you would want the @ operator instead of SPC. @ just adds the variable, it doesn't put a space in.
And just for the sake of knowing, the NL operator inserts a line break.

Loakey_P2P 12-27-2006 11:17 PM

yea , that solved the problem . the first time i tryed to use @ i must have screwed up else where couse it didnt work . but its working now . thanks .


All times are GMT +2. The time now is 08:41 AM.

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