SA-MP Forums Archive
4 Errors while creating scripts - 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: 4 Errors while creating scripts (/showthread.php?tid=301037)



4 Errors while creating scripts - JanNovak - 02.12.2011

I get these errors while trying to create commands with ZCMDS:

C:\DOCUME~1\Jan\Desktop\SAMP03~1\pawno\include\zcm d.inc(62) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit")
C:\DOCUME~1\Jan\Desktop\SAMP03~1\pawno\include\zcm d.inc(64) : error 017: undefined symbol "funcidx"
C:\DOCUME~1\Jan\Desktop\SAMP03~1\pawno\include\zcm d.inc(64) : warning 215: expression has no effect
C:\DOCUME~1\Jan\Desktop\SAMP03~1\pawno\include\zcm d.inc(64) : error 001: expected token: ";", but found ")"
C:\DOCUME~1\Jan\Desktop\SAMP03~1\pawno\include\zcm d.inc(64) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Jan\Desktop\SAMP03~1\pawno\include\zcm d.inc(64) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Anyone help?


Re: 4 Errors while creating scripts - MP2 - 02.12.2011

Show the #include lines.
Make sure it's included _AFTER_ a_samp etc.


Re: 4 Errors while creating scripts - JanNovak - 03.12.2011

I have included it after a_samp and this came up:

C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(12) : error 017: undefined symbol "New"
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(12) : error 017: undefined symbol "targetid"
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(12) : warning 215: expression has no effect
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(13) : error 017: undefined symbol "targetid"
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(13) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(13) : error 017: undefined symbol "Correct"
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(13) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.


Re: 4 Errors while creating scripts - Kostas' - 03.12.2011

Show us lines 1 to 15


Re: 4 Errors while creating scripts - sleepysnowflake - 03.12.2011

You have probablly done like this:

pawn Код:
New targetid;

new targetid; // CHANGE IT WITH THIS!



Re: 4 Errors while creating scripts - JanNovak - 03.12.2011

Quote:
Originally Posted by Berlovan
Посмотреть сообщение
You have probablly done like this:

pawn Код:
New targetid;

new targetid; // CHANGE IT WITH THIS!
4 more errors:
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(13) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(13) : error 017: undefined symbol "Correct"
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(13) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(13) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Lines 1 - 15:

pawn Код:
// Simple Commands for RP Servers
// Credits to JanNovak

#include <sscanf2>
#include <a_samp>
#include <zcmd>

#define black 000000

CMD:heal(playerid, params[])
{
     new targetid;
     if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, black, "Correct Usage: /heal [ID]
     if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, black, "
Player not Connected to the Server"
     SetPlayerHealth(targetid, 100)



Re: 4 Errors while creating scripts - MadSkillz - 03.12.2011

Fixed for you

Код:
// Simple Commands for RP Servers
// Credits to JanNovak

#include <sscanf2>
#include <a_samp>
#include <zcmd>

#define black 000000

CMD:heal(playerid, params[])
{
     new targetid;
     if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, black, "Correct Usage: /heal [ID]");
     if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, black, "Player not Connected to the Server");
     SetPlayerHealth(targetid, 100);
     return 1;
}



Re: 4 Errors while creating scripts - JanNovak - 03.12.2011

Not really...

C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(21 -- 22) : error 001: expected token: ",", but found "if"
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(22 -- 23) : error 001: expected token: ",", but found "-identifier-"
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(29) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(29) : error 017: undefined symbol "Correct"
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(29) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jan\Desktop\Trucking RPG [TRPG]\filterscripts\Commands.pwn(29) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Script: http://pastebin.com/6WJm7Hcb


Re: 4 Errors while creating scripts - Kostas' - 03.12.2011

pawn Код:
// Simple Commands for RP Servers
// Credits to JanNovak

#include <a_samp>
#include <sscanf2>
#include <zcmd>

#define black 000000

CMD:heal(playerid, params[])
{
     new
        targetid;
     if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, black, "Correct Usage: /heal [ID]");
     if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, black, "Player not Connected to the Server");
     SetPlayerHealth(targetid, 100);
     return 1;
}



Re: 4 Errors while creating scripts - JanNovak - 03.12.2011

The problem is not in 1-16 anymore, its in the Givemoney command, the script is above