Pawn Errors -
Lunixx - 14.10.2013
Errors:
C:\Documents and Settings\LinesX\Desktop\PZG\PZG\gamemodes\PZG.pwn( 27) : error 001: expected token: ";", but found "new"
C:\Documents and Settings\LinesX\Desktop\PZG\PZG\gamemodes\PZG.pwn( 68584) : error 001: expected token: ":", but found "{"
Line 27: new pTrack[MAX_PLAYERS] = {INVALID_PLAYER_ID,...},pTrackTimer[MAX_PLAYERS];
Line 68584: {
Before line 68584: CMD:c20(playerid,params[])
{
switch(pTrack[playerid])
{
case INVALID_PLAYER_ID:
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"/c20 [playerid]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Invalid playerid");
pTrack[playerid] = id;
pTrackTimer[playerid] = SetTimerEx("TrackTimer",1000,1,"i",playerid);
}
default
{
pTrack[playerid] = INVALID_PLAYER_ID;
KillTimer(pTrackTimer[playerid]);
DisablePlayerCheckpoint(playerid);
}
}
return 1;
}
public TrackTimer(playerid)
{(this is the error)
new Float

os[3];
GetPlayerPos(pTrack[playerid],pos[0],pos[1],pos[2]);
SetPlayerCheckpoint(playerid,pos[0],pos[1],pos[2],4.0);
return 1;
}
Re: Pawn Errors -
Jankingston - 14.10.2013
pawn Код:
CMD:c20(playerid,params[])
{
switch(pTrack[playerid]);
{
case INVALID_PLAYER_ID:
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"/c20 [playerid]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Invalid playerid");
pTrack[playerid] = id;
pTrackTimer[playerid] = SetTimerEx("TrackTimer",1000,1,"i",playerid);
}
}
default
{
pTrack[playerid] = INVALID_PLAYER_ID;
KillTimer(pTrackTimer[playerid]);
DisablePlayerCheckpoint(playerid);
}
}
return 1;
}
public TrackTimer(playerid)
{
new Float:pos[3];
GetPlayerPos(pTrack[playerid], pos[0], pos[1], pos[2]);
SetPlayerCheckpoint(playerid, pos[0], pos[1],pos [2], 4.0);
return 1;
}
}
Re: Pawn Errors -
newbie scripter - 14.10.2013
@jankingston its Float:Pos not Floatos
Re: Pawn Errors -
Lunixx - 14.10.2013
C:\Documents and Settings\LinesX\Desktop\PZG\PZG\gamemodes\PZG.pwn( 68577) : error 001: expected token: "{", but found ";"
C:\Documents and Settings\LinesX\Desktop\PZG\PZG\gamemodes\PZG.pwn( 68579) : error 014: invalid statement; not in switch
C:\Documents and Settings\LinesX\Desktop\PZG\PZG\gamemodes\PZG.pwn( 68579) : warning 215: expression has no effect
C:\Documents and Settings\LinesX\Desktop\PZG\PZG\gamemodes\PZG.pwn( 68579) : error 001: expected token: ";", but found ":"
C:\Documents and Settings\LinesX\Desktop\PZG\PZG\gamemodes\PZG.pwn( 68579) : error 029: invalid expression, assumed zero
C:\Documents and Settings\LinesX\Desktop\PZG\PZG\gamemodes\PZG.pwn( 68579) : fatal error 107: too many error messages on one line
Re: Pawn Errors -
Jankingston - 14.10.2013
Quote:
Originally Posted by newbie scripter
@jankingston its Float:Pos not Floatos
|
my bad :P
Re: Pawn Errors -
Lunixx - 14.10.2013
any has fix for these errors?
Re: Pawn Errors -
Konstantinos - 14.10.2013
Above this line (at 26):
pawn Код:
new pTrack[MAX_PLAYERS] = {INVALID_PLAYER_ID,...},pTrackTimer[MAX_PLAYERS];
you've forgot a semicolon (; ) at the end.
pawn Код:
CMD:c20(playerid,params[])
{
switch(pTrack[playerid])
{
case INVALID_PLAYER_ID:
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"/c20 [playerid]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Invalid playerid");
pTrack[playerid] = id;
pTrackTimer[playerid] = SetTimerEx("TrackTimer",1000,1,"i",playerid);
}
default:
{
pTrack[playerid] = INVALID_PLAYER_ID;
KillTimer(pTrackTimer[playerid]);
DisablePlayerCheckpoint(playerid);
}
}
return 1;
}
public TrackTimer(playerid)
{
new pos[3];
GetPlayerPos(pTrack[playerid],pos[0],pos[1],pos[2]);
SetPlayerCheckpoint(playerid,pos[0],pos[1],pos[2],4.0);
return 1;
}
And for the second one, you missed a : after default.