Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Cheat Windows (https://forums.graalonline.com/forums/showthread.php?t=134267547)

cbk1994 12-19-2012 01:00 AM

Comparing arrays doesn't always work well. You can coerce them to strings for the comparison like so:

PHP Code:

if ((@ array1) == (@ array2)) { // this looks ugly, there is
                               // probably a better way to format this 


Stowen 12-19-2012 01:06 AM

You mean like this?:

PHP Code:

if ((@ itemList) == (@ itemList2)) 


Tim_Rocks 12-19-2012 09:12 AM

Quote:

Originally Posted by Stowen (Post 1709881)
You mean like this?:

PHP Code:

if ((@ itemList) == (@ itemList2)) 


That's exactly what he wrote, you just have different variable names...

cbk1994 12-19-2012 10:45 AM

Quote:

Originally Posted by Stowen (Post 1709881)
You mean like this?:

PHP Code:

if ((@ itemList) == (@ itemList2)) 


Yes, but depending on what you're doing, remember that your lists will need to be in the same order for that to work. If you want to compare them without paying attention to order, you'll have to do a bit more work.

callimuc 12-19-2012 02:20 PM

Quote:

Originally Posted by Stowen (Post 1709881)
You mean like this?:

PHP Code:

if ((@ itemList) == (@ itemList2)) 


since you have been using a this.variable, you might also want to add this. into your check

PHP Code:

if ((@ this.itemList) == (@ this.itemList2)) 


Stowen 12-19-2012 08:07 PM

Alright, thanks guys. The check returned positive, so that did work.


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

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