13.02.2011, 11:34
I get this error, and these warnings when I compile the script ( Ravens Roleplay (LARP) )
C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(25115) : error 021: symbol already defined: "strtok"
C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(53561) : warning 217: loose indentation
C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(53565) : warning 217: loose indentation
C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(5356 : warning 217: loose indentation
C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(53572) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
The code where I get the error:
And the warnings:
C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(25115) : error 021: symbol already defined: "strtok"
C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(53561) : warning 217: loose indentation
C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(53565) : warning 217: loose indentation
C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(5356 : warning 217: loose indentation
C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(53572) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
The code where I get the error:
pawn Код:
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
pawn Код:
//------------------------------[Flip]-----------------------------------------------------------
if(strcmp(cmd, "/flip", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:PX, Float:PY, Float:PZ, Float:PA;
GetPlayerPos(playerid, PX, PY, PZ);
GetVehicleZAngle(GetPlayerVehicleID(playerid), PA);
SetVehiclePos(GetPlayerVehicleID(playerid), PX, PY, PZ+1);
SetVehicleZAngle(GetPlayerVehicleID(playerid), PA);
SendClientMessage(playerid, COLOR_GREEN," Vehicle Succesfully Flipped!");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You Are Not An Admin Level 3!");
}
return 1;
}