Help with code - 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: Help with code (
/showthread.php?tid=526163)
Help with code -
elirand21 - 15.07.2014
Hi, I have a problem in the code do not know what.
Errors & warnings:
Код:
Server\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
Server\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
Server\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
Server\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
AdminMode.pwn(11) : error 049: invalid line continuation
AdminMode.pwn(12) : error 055: start of function body without function header
AdminMode.pwn(15) : error 017: undefined symbol "pInfoE"
AdminMode.pwn(15) : error 009: invalid array size (negative, zero or out of bounds)
AdminMode.pwn(19) : error 049: invalid line continuation
AdminMode.pwn(20) : error 055: start of function body without function header
AdminMode.pwn(21) : error 010: invalid function or declaration
AdminMode.pwn(24) : error 010: invalid function or declaration
AdminMode.pwn(28) : error 017: undefined symbol "ALevel"
AdminMode.pwn(38) : error 017: undefined symbol "ALevel"
AdminMode.pwn(43) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
11 Errors.
Code:
http://pastebin.com/1KSBjv1M (Gibberish is why I wrote in another language)
Thanks in advance
Re: Help with code -
elirand21 - 16.07.2014
Help please?
Re: Help with code -
Blast3r - 16.07.2014
Defining the new string on top of the script is a bad idea, it always interrupts the includes, so I'd suggest you only use new string[128]; at commands and other functions you're using. And what's the point of new Player definition when you already got "playerid" in commands so I'd suggest you change the
pawn Код:
if(sscanf(params,"u",Player)) return SendClientMessage(playerid,-1,"{ff0000}You need to set id:{0099FF}/GetPlayer (PlayerID)");
to
pawn Код:
if(sscanf(params,"u",playerid)) return SendClientMessage(playerid,-1,"{ff0000}You need to set id:{0099FF}/GetPlayer (PlayerID)");
There are probably some more errors that my eye didn't catch, but for now use what I gave you and send the remaining errors.