![]() |
Loses temp value
I can't for the life of me figure out, or know, why this temp.message var loses its array value.... the first player.chat shows up perfectly fine, but the player.chat marked under // HERE is empty. The script does make it to that spot just fine.
PHP Code:
|
Use the temp. prefix (temp.message) throughout your code (not just message) and see if you still have the same issues. message is also a function so I would probably replace it with msg just so it's not potentially conflicting.
|
Not sure if it's exactly related, but I've reported similar problems:
http://forums.graalonline.com/forums...05#post1514105 |
fowlplay: From my experience proper syntax is temp.var, and I typically initialize the temp.var as so, but nothing so far has stopped it from working as long as its a local var. Although, I went and changed all of them, and changes message to msg and it still isn't working at all....
Dusty: Pretty much the same thing probably. It's just odd because at first I had this, not sending an array through but just single var to the public funciton PHP Code:
Really, really annoying.... anyone else have any other ideas. To explain a little deeper a level npc is just sending the information to this (might as well put updated anyways): PHP Code:
PHP Code:
PHP Code:
|
Have you been able to isolate it beyond that? (e.g. if you comment out the tweens, does it work?) My guess would be a sleep in the tweens is doing something odd.
Also, I would always avoid using "message" as a variable name. I've had problems with that forever. |
Compare the top to the one I'm trying to make work. This works when NOT sending an array to it.
PHP Code:
PHP Code:
PHP Code:
So it's not the tween. I don't think it's the way I'm sending an array or the fact that I am sending an array or not because it worked where I marked in the previous post in comments which chat showed it, then 10 lines down it's lost. I just don't get this. Tried everything I can think of. |
This worked. Had to just assign it separate and correctly into this.vars
PHP Code:
That's still bs imo. Local vars should be able to work as far as I can see. All well. If someone notices something to teach me or something I did wrong please note so I can switch it back to local vars. |
What you're referring to as 'temp vars' are the function parameters, and if your system uses waitfor/sleep that can make those disappear for some reason (as you found out) so you need to store them.
|
| All times are GMT +2. The time now is 01:59 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.