First Script Problem (Very Small)
Basically what I want to do is give random equipment, and a certain ammount of it each round to all the players (maybe different to each player?).
THE PROBLEM NOW - Look at my bottom post for explaination. Code:
|
ammo_type and ammo_amount are defined in the heading of your script, but then you redefine them in new_round.
When you try to redefine them, you attempt to set their value to a function. The proper usage would be variable = str_to_num(stringhere), but there are no strings to convert to numbers in the first place. Then, you try to set integers (ammo_type and ammo_amount) to a string ("1"). Just use 1. |
Alright It compiles properly now, but ingame is another story. This plugin goes crazy, it seems it runs round start sub like every .000001 seconds. Shouldn't it be only running once at round start? It's even running before anybody has joined. The exact debug targets the random function for a "stack" error. Thanks for your help.
NOTE: I updated script in first post to reflect newest. |
your gonna have to write the names in like this
new ammo[32] ammo[] = "ammo_name" |
Timmi, I don't see anywhere in the script where he would need to do that. Also, I have no idea why ResetHUD is being called so many times.
|
The script works perfect except for it being called so many times over and over (until it eventually gives me an overflow). Any ideas how to fix would be nice.
|
ResetHUD is called many times. How every many times its need to correct the HUD.. like time ammo etc. So you need to include something that will narrow it down a little. BTW using resetHUD for new round is bad anyways ;) EX.
Code:
|
Alright compiles fine, and it displays the message random equip message too, the only thing, it doesn't give the equip. Here are the errors it gives me from ingame debugger:
Code:
L 01/11/2005 - 22:28:29: [AMXX] Native error in "give_item" on line 52 (file "randomequip.sma"). |
add a line before line 52 that is:
Code:
|
Okay then why isn't it detected when I or others are connected? I have tested with people, and it still isn't saying anybody is connected (not giving anybody anything)?
Is that a dedicated server only check? I am using listen. |
| All times are GMT -4. The time now is 19:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.