Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-09-2007, 07:22 PM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Bug or not?

PHP Code:
temp.test1 = {"Hello""How""Are""You", {"On""This""Fine""Day"}};
temp.test2 = {"Hello""How""Are""You", {"On""This""Fine""Day"}};

if (
temp.test1 == temp.test2) echo("MATCH"); 
doesn't work?
__________________
- Zidane / Zidaya
Reply With Quote
  #2  
Old 06-09-2007, 09:46 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Graal's comparison operator doesn't really compare the structure of an array like that; if you want to compare two arrays, convert them to strings first using the magic @ operator:
PHP Code:
if (@temp.test1 == @temp.test2)
{
  echo(
"MATCH");

__________________
Skyld
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:45 PM.


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