![]() |
weird bug [arrays]
well, it's odd.
Here's an array thing HTML Code:
function onCreated() Although, if I am to do this HTML Code:
function onCreated() |
Dynamic variables are fun.
|
It seems that var.index() only accepts strings as its parameter, so it's no bug.
Inverness: I don't think you caught what was being pointed out... :confused: |
PHP Code:
This is just because you're interpreting the object as it's input. There was something about Stefan claiming this a while ago. It was in one of the threads.... I'll see if I can find it. |
Quote:
Something about this was mentioned many months ago, its one of those weird Graal things. :D Fix it Stefan >:O |
but abs() around to make it positive if it's the correct number XD lol, don't listen to me :P
|
Quote:
|
You can't compare arrays with the == operator, that's why index() is not working with arrays either. If you convert it to string then it's comparing each array member with a string comparison and is return the wished index. This can also help if you want to find an object in an array with the same name, just give @object or object.name as parameter to the index() function.
|
I was having issues with simple scripts not working because I didn't put a delimiter (@) in a place where it doesn't need to be.
Such As player.chat = serverr.chat; Would Have To Be player.chat = @serverr.chat; (Just an example - not necessarily one script with issues.) |
| All times are GMT +2. The time now is 07:48 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.