Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   Troubles with #v() (https://forums.graalonline.com/forums/showthread.php?t=3943)

Bravo_NPC-Admin1 05-31-2001 10:43 PM

Troubles with #v()
 
I think the #v() command is broken. In proof, try this code:
NPC Code:

// NPC made by Boco
if (playerenters) {
this.Count=5;
say2 The count is #v(this.Count);
}


Normally, a sign would pop-up with the text, "The count is 5". But, that isn't the case. Instead, you see, "The count is 0". Am I doing something wrong, or is this command really bugged?

Kaimetsu 05-31-2001 10:49 PM

Re: Troubles with #v()
 
It's say2. It won't let you put stuff like that in, unfortunately.

At least, I think that's the problem.

Bhala 05-31-2001 11:38 PM

I have never had #v() work for me....I have had to use #s

grim_squeaker_x 06-01-2001 12:28 AM

If just #v(varname) doesn't work, I'd suggest trying: #s(strtofloat(#v(varname))), sounds a bit weird, but it might just work.

WhoopA 06-01-2001 08:57 AM

Try making the variable lowercase. That might fix it. I know #v works for me...

Bravo_NPC-Admin1 06-01-2001 12:09 PM

Problem is NPC variables
 
I modifed my code:
NPC Code:

// NPC made by Boco
if (playerenters) {
test=1;
this.test=1;
level.test=1;
client.test=1;
server.test=1;
//If return's 1, then it works. If 0, then brokey
say2
Normal is #v(test)#b
Level is #v(level.test)#b
NPC-Only is #v(this.test)#b
Client is #v(client.test)#b
Server is #v(server.test);
}



I tested all forms of the variable, and these are my results. I ran the test NPC and a sign popped up saying:

Normal is 1
Level is 1
NPC-Only is 0
Client is 1
Server is 1

this.variables are the only ones that don't work right. #s(this.variables) work, but for some reason, they don't with #v()... I am pretty sure this is a bug. Should I post this on the bug board now?

Admins 06-03-2001 04:59 AM

Thanks for submitting it.
I have checked it, the problem is that
the npc uses a special function for say/say2
to parse the image codes (#i) and such stuff
and that function is npc-independed,
so no npc variables can be accessed.
I will fix that in the next version.


All times are GMT +2. The time now is 11:50 AM.

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