A-System error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A-System error (
/showthread.php?tid=531696)
A-System error -
DeoXel - 14.08.2014
Help...
Код:
CMD:setadmin(playerid, params[]) <<=== Line 146
{
if(!IsPlayerAdmin(playerid))return 0;
if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "USAGE: /setadmin [ID] [Level 1-4]");
Errors:
Код:
C:\Users\Petr\Desktop\TestServer\gamemodes\test.pwn(146) : error 029: invalid expression, assumed zero
C:\Users\Petr\Desktop\TestServer\gamemodes\test.pwn(146) : error 017: undefined symbol "cmd_setadmin"
C:\Users\Petr\Desktop\TestServer\gamemodes\test.pwn(146) : error 029: invalid expression, assumed zero
C:\Users\Petr\Desktop\TestServer\gamemodes\test.pwn(146) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: A-System error -
Sawalha - 14.08.2014
Are you having the include "ZCMD" ?
Re: A-System error -
DeoXel - 14.08.2014
Yes..
Re: A-System error -
GGW - 14.08.2014
You have to put this code in the Top of your Scripts
Код HTML:
#include<zcmd>
#include <sscanf>
Re: A-System error -
DeoXel - 14.08.2014
On Top:
#include <a_samp>
#include <zcmd>
#include <sscanf>
#pragma tabsize 0
Same error
Re: A-System error -
DeoXel - 14.08.2014
Do you know?
Re: A-System error -
CutX - 14.08.2014
we can see from this error message:
Quote:
undefined symbol "cmd_setadmin"
|
that you've correctly included zcmd.
so that's not a problem here, if he wouldn't have included it, the errors wouldn't be the same. - just sayin'
there's one more thing which can cause these kind of errors,
you might've forgotten a closing bracket "}"
somewhere right above that command
as an example, something like this
pawn Код:
CMD:someCmdAbove(playerid, params[])
{
//some code
return 1;
//missing closing bracket
CMD:setadmin(playerid, params[])
{
//some code
return 1;
}
would cause exactly that errors you've got there
Код:
error 029: invalid expression, assumed zero
error 017: undefined symbol "cmd_setadmin"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
also, there might be more errors/warnings waiting for you as the pawn parser
couldn't finish his job and stopped at that line.
Meaning it didn't parse the code after that line