rendered paste body#include <a_samp>
new Plot1X[250], Plot1Y[250];
new plot;
main()
{
print("\n----------------------------------");
print(" This is a blank GameModeScript");
print("----------------------------------\n");
}
public OnGameModeInit()
{
print("GameModeInit()");
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
plot=0;
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
printf("OnPlayerRequestClass(%d, %d)", 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 OnGameModeExit()
{
print("GameModeExit()");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new Float:X, Float:Y, Float:Z;
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmdtext, "/plot", true)==0)
{
plot++;
if(plot == 1) {
GetPlayerPos(playerid, X, Y, Z);
Plot1X = X;
Plot1Y = Y;
}
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;
}
C:\Documents and Settings\Patrick\Desktop\Property Script\property.pwn(96) : error 033: array must be indexed (variable "Plot1X")
C:\Documents and Settings\Patrick\Desktop\Property Script\property.pwn(97) : error 033: array must be indexed (variable "Plot1Y")
Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase
2 Errors.