![]() |
Awesome, another gani related question!
So like, Ive been having this problem for quite some time now.. its the same problems Stan recently posted about, but I didnt want to hijack his thread with my own question.
I checked that thread, didnt come up with a solution. Perhaps Im just tired? Hmm.. so anyways, the problem: PHP Code:
PHP Code:
My question is, how do I fix this? |
Hmm, arrays in player attributes never worked for me, what i do is convert my array to a string before sending it to the attributes, and it works fine...
this.array {"test", "array"}; player.attr[10] = (@this.array); this.array = player.attr[10]; I remember readign on the forums about the same problem a couple of months ago but don't remember how it ended, so there might be a better solution but this oen works for me :P |
try
PHP Code:
|
Quote:
|
Wait, this is the same problem I had with my floating text >_>
I just have something to change/show the text when a other attr is changed while the attr[ 21] is changed, like PHP Code:
Just a thought tho |
Quote:
|
Quote:
http://forums.graalonline.com/forums...ad.php?t=72108 @ post 16 |
In the gani, don't make it display the actual player attribute. Do something like
HTML Code:
function onCreated() |
The problem is that attr[] are basicly strings (even if they look like normal variables). So it is better to do something like:
temp.var = player.attr[21]; echo("test: " @ temp.var[1]); |
Quote:
The array obviously is not working, a truth which contridicts your statement. Why would you be posting? :) I am not sure what part of your npc you are pulling your code from but bear with me. You are assigning that attribute clientsided, yes? Your clientside variable may very well be able to store that array, that attr variable on your clientside is nothing more then a variable. HOWEVER, when another player pulls it from you, they are only getting the first index, since attr cannot handle anything else between clients. If my memory serves me correctly, attributes have to be strings. If this be the case, the optimal solution you have available to you is converting it to a string before sending it, such as putting the @ in front as I had earlier seen in this thread. |
| All times are GMT +2. The time now is 06:04 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.