Die Errors:
C:\Users\Christian\Desktop\World of San Andreas 4.0.2\gamemodes\WorldofSanAndreas.pwn(11313) : error 017: undefined symbol "BenzinJames"
C:\Users\Christian\Desktop\World of San Andreas 4.0.2\gamemodes\WorldofSanAndreas.pwn(33102) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\Christian\Desktop\World of San Andreas 4.0.2\gamemodes\WorldofSanAndreas.pwn(33103) : error 017: undefined symbol "BenzinJames"
C:\Users\Christian\Desktop\World of San Andreas 4.0.2\gamemodes\WorldofSanAndreas.pwn(33103) : warning 215: expression has no effect
C:\Users\Christian\Desktop\World of San Andreas 4.0.2\gamemodes\WorldofSanAndreas.pwn(33103) : error 001: expected token: ";", but found "]"
C:\Users\Christian\Desktop\World of San Andreas 4.0.2\gamemodes\WorldofSanAndreas.pwn(33103) : error 029: invalid expression, assumed zero
C:\Users\Christian\Desktop\World of San Andreas 4.0.2\gamemodes\WorldofSanAndreas.pwn(33103) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Die Fucntion Load/save
Function LoadBenzin()
{
new arrCoords[7][64];
new strFromFile2[256];
new File: file = fopen("benzinJames.ini", io_read);
if (file)
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
BenzinJames = strval(arrCoords[0]);
fclose(file);
if(Security == 0)
{
}
else
{
GameModeExit();
}
}
else
{
GameModeExit();
}
return 1;
}
Function SaveBenzin()
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%d", Benzin);
new File: file2 = fopen("benzinJames.ini", io_write);
fwrite(file2, coordsstring);
fclose(file2);
return 1;
}
Der Befehl?
if(strcmp(cmd, "/tankpreis", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GOLD, "Benutzung:/tankpreis [$/Liter]");
return 1;
}
LoadBenzin();
new Preis;
new playerid;
BenzinJames[playerid] == Preis;
SaveBenzin();
return 1;
}
MfG James