IF problem
its not an error but i dont like seeing warnings:P
right i moved some of my functions into a .inc to make it tidyer, and to make shure the plugin is enabled and that the person is an admin in those functions Code:
Welcome to the AMX Mod X 1.60-300 Compiler. Copyright (c) 1997-2005 ITB CompuPhase, AMX Mod X Team sshp_restore.inc(16) : warning 213: tag mismatch sshp_restore.inc(17 -- 18) : warning 215: expression has no effect ok how do i fix my code up |
Code:
Try this |
Probably enabled[0] == 0 would do the trick.
|
My guess is that enabled is a boolean variable, and 0 is an integer expression, so check to see if it equals false instead of 0, but I can't be sure because you didn't show how you created the variable.
|
The Variable could be indexed and you are using a variable in that case try
Code:
|
If it was an array then it would've given off an "array must be indexed"warning instead of "tag mismatch". Also, "enabled" is a name that strikes me as yes or no, so I'm guessing he declared it as boolean, but he checked it for an integer value.
|
| All times are GMT -4. The time now is 23:43. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.