Script Help.
Why doesn't this script remove the player from the array? What I'm trying to do is get the list of members in a guild then remove the player that is said. Everything works but the removing of the player. The player I'm trying to remove is "Test".
PHP Code:
this is what echos into rc. [12:39] ------------------------------ [12:39] Updated Array: Graal1341684, [12:39] Updated Array: Graal1341684,Holder [12:39] Updated Array: Graal1341684,Holder,Test [12:39] Updated Array: Graal1341684,Holder,Test,Holder2 [12:39] Remove: Test [12:39] From: Graal1341684,Holder,Test,Holder2 [12:39] New Array: 0 [12:39] ------------------------------ |
array.delete mutates the array, it doesn't return a new one. So:
PHP Code:
edit: on a related note, beware SQL injection in that query if you're not already escaping those values. |
Thanks, it worked! :)
|
What am I doing wrong in this script? I can't get it to do a triggerserver in it so I can destroy once player gets it.
This is the class im using and also the weapon. PHP Code:
PHP Code:
|
That doesn't look like a weapon to me? You can't trigger it like a weapon if it's an NPC.
For level NPCs, you have two options: try to trigger at its coordinates (x/y), which imo is almost always a bad idea (things can block the trigger, you need to be careful with the shape, it really shouldn't move, etc.); or, trigger something else (a DB NPC or weapon, for example), and have it handle the action. In your case you might just want to move the check serverside, but not really sure what you're trying to accomplish. |
I was trying to make something like a trash picker but where I picked up mini noob npcs. I did get it to work but I had to completely rewrite the script and make it server side.
|
Can someone tell me what I'm doing wrong here? I'm making a showlag command that shows the lag and says if its low, moderate, high etc. Later on I'm planning on changing the color of text so if its high the text is red and low is green. Anyways here is the script.
PHP Code:
|
Quote:
|
Quote:
It was such a simple mistake that took me 2 days to find. :mad: |
Quote:
i see an one instead of a i :p (unless that was on purpose to see what it was going to echo), I hate when i do typos like that. |
All times are GMT +2. The time now is 10:37 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.