Errors With My Plugin
I have my plugin which is
Code:
What it does is it give someone no clip for 2 seconds to get out of an area if there stuck like in a false kz_teleport. You can use it once every 60 seconds! And I get errors! here they are unstick.sma<54> : warning 217: loose indentation unstick.sma<54> : error 029: incalid expression, assumed zero unstick.sma<54> : error 017: undefined symbol "unstick" unstick.sma<66> : error 017: undefined symbol "disable" unstick.sma<71> : error 029: invalid expression, assumed zero unstick.sma<71> : error 017: undefined symbol "reenable" unstick.sma<73> : error 001: expected token: ">", but found "-end of file-" Can anyone do this / help?! Thanks Please Re-post! |
Dude...why don't you take a look at your brackets...
*hint hint* the reset function... |
Code:
missing brackets. also these should be arrays Code:
|
Arrays??? What's that?
|
stuff inside these boxes
[] example Code:
If you dont noe how to use array then leanr cuz ur plugin is buggy without them |
See, if you want to keep track of each player, you're going to want 32 'isusingunstick' and 'canuseunstick' variables.
But it's much easier to do isusingunstick[Player #] than isusingunstick1 isusingunstick2 etc. |
Eh I didn't know you need to make bools an array.
|
me either :|
|
You dont.
*sighs* Listen, you have thirty-two players the variable, isusingunstick has only two values. "True" and "False" So, who is using unstick? You cannot tell. It can only be True or False, it cannot be '32 is True' or '1 is False'. So when you want to figure out whether a player number n is using unstick, how do you do it? What if TWO players use unstick at the same time?! You cannot give a single boolean 64 possible values. The most efficient method is bitwise manipulation, in which you could store 32 booleans in a single integer, but that is clearly not the case! Let's think logically. If two players use it at the same time, you have the same boolean value applying to both players, regardless of whether it is true or not! Let's think logically! |
Ehhhh
Arrays Make more errors well, Here is my script Code:
INvaild Function or Declaration on both Line 34 and 31 Fix it? :P |
| All times are GMT -4. The time now is 17:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.