pawn Code:
C:\Users\Alex\Desktop\Untitled.pwn(64) : error 029: invalid expression, assumed zero
C:\Users\Alex\Desktop\Untitled.pwn(64) : error 029: invalid expression, assumed zero
C:\Users\Alex\Desktop\Untitled.pwn(65) : warning 217: loose indentation
C:\Users\Alex\Desktop\Untitled.pwn(71) : error 017: undefined symbol "strtok"
C:\Users\Alex\Desktop\Untitled.pwn(71) : error 033: array must be indexed (variable "tmp")
C:\Users\Alex\Desktop\Untitled.pwn(72) : error 079: inconsistent return types (array & non-array)
C:\Users\Alex\Desktop\Untitled.pwn(79) : error 079: inconsistent return types (array & non-array)
C:\Users\Alex\Desktop\Untitled.pwn(98) : error 079: inconsistent return types (array & non-array)
C:\Users\Alex\Desktop\Untitled.pwn(100) : error 079: inconsistent return types (array & non-array)
C:\Users\Alex\Desktop\Untitled.pwn(102) : error 079: inconsistent return types (array & non-array)
C:\Users\Alex\Desktop\Untitled.pwn(104) : error 017: undefined symbol "strtok"
C:\Users\Alex\Desktop\Untitled.pwn(104) : error 029: invalid expression, assumed zero
C:\Users\Alex\Desktop\Untitled.pwn(104) : error 017: undefined symbol "string"
C:\Users\Alex\Desktop\Untitled.pwn(104) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Hole Code:
pawn Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/evento", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new eventid[20], tmp[128], idx;
tmp = strtok(cmdtext, idx);
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Necesitas ser RCON!");
if(!strlen(tmp))
{
SendClientMessage(playerid, -1, "Usage: /evento motos");
SendClientMessage(playerid, -1, "Usage: /evento amatar");
SendClientMessage(playerid, -1, "Usage: /evento autos");
SendClientMessage(playerid, -1, "Usage: /evento carrera");
return 1;
}
strmid(eventid, tmp, 0, strlen(cmdtext), 255);
if(strcmp(eventid, "motos", true, strlen(eventid)) == 0)
{
// Do your motos code
}
else if(strcmp(eventid, "amatar", true, strlen(eventid)) == 0)
{
// Do your amatar code
}
else if(strcmp(eventid, "autos", true, strlen(eventid)) == 0)
{
// Do your autos code
}
else if(strcmp(eventid, "carrera", true, strlen(eventid)) == 0)
{
// Do your carrera code
}
else return SendClientMessage(playerid, -1,"Unkown parameter! [Motos, Amatar, Autos, Carrera]");
}
return 1;
}
return 0;
}
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;
}