Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   Error in the scripting engine? (https://forums.graalonline.com/forums/showthread.php?t=28496)

Kaimetsu 05-03-2002 01:04 PM

Error in the scripting engine?
 
NPC Code:

if(playerenters){
array1={0,1,2};
array2={2,1,0};
num1=2;
num2=0;

debug1=array1[num1]; debug2=array2[num2];
if(array1[num1]==array2[num2]) message #v(debug1)==#v(debug2);
else message #v(debug1)!=#v(debug2);
}



According to this script, 2!=2. It seems to only be a problem with two arrays, where the indices are specified by two different variables.

Tyhm 05-03-2002 03:42 PM

You think that's fun? The bank card used == for assignments. A full day of people getting locked up every time they tried to make a deposit or withdrawal, that was unique. =_=

I've never been big on displaying booleans directly. Does indirectly work, if(this==this) message True; else message False; ?

Admins 05-03-2002 05:33 PM

Ok fixed in v2.14 rev4, it compared the arrays ({0,1,2}=={2,1,0}) instead of the array fields

Kaimetsu 05-03-2002 05:47 PM

Quote:

Originally posted by Stefan
Ok fixed in v2.14 rev4, it compared the arrays ({0,1,2}=={2,1,0}) instead of the array fields
:)


All times are GMT +2. The time now is 01:32 AM.

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