Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Setting variables. (https://forums.graalonline.com/forums/showthread.php?t=47142)

Benm00t 08-15-2003 01:43 AM

Setting variables.
 
When i try to set a message code as a variable, i always seem to get an error message. Say if i wanted to:

this.myvar=#p(0);

I would get Error: Expected format var, var[i], obj[i].attr, function(a), function(a,b).

How do i save message codes to variables sucessfully?

Thanx!

TribulationStaff 08-15-2003 01:45 AM

as far as I know all #variables are strings, you would need to either setstring or to use strtofloat

Riot-Starter 08-15-2003 01:49 AM

Quote:

Originally posted by TribulationStaff
as far as I know all #variables are strings, you would need to either setstring or to use strtofloat
Yep.

Inorder to set #p(0) to a variable you must use strtofloat().

Benm00t 08-15-2003 01:53 AM

ah, works. Thanks guys :-D


All times are GMT +2. The time now is 07:04 AM.

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