what's wrong? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: what's wrong? (
/showthread.php?tid=334469)
what's wrong? -
Face9000 - 14.04.2012
This are the errors:
error 001: expected token: ";", but found "-identifier-"
error 028: invalid subscript (not an array or too many subscripts): "bupm"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line
And this is the line:
pawn Код:
format(b, sizeof(b), "- SUCCESS ROBBERY - Wanted Level %d - Robbed %i$",plwl,bupm[playerid]);
I've declared bupm and plwl but idk it gives me that errors.
Re: what's wrong? -
MP2 - 14.04.2012
Show the line above that, and the declaration if bupm. Also, naming a string 'b' is bad, you should name variables properly.
Re: what's wrong? -
Kitten - 14.04.2012
Mind showing the variable "bupm[playerid]".
Re: what's wrong? -
MP2 - 14.04.2012
Show the line above that, and the declaration if bupm. Also, naming a string 'b' is bad, you should name variables properly.
Re: what's wrong? -
MP2 - 14.04.2012
Yeah happened to both of us..
Re: what's wrong? -
Face9000 - 14.04.2012
Here is:
pawn Код:
KillTimer(pBupTimerID[playerid]);
new bupm = 70000 + random(250000);
GivePlayerMoney(playerid,bupm);
new plwl = GetPlayerWantedLevel(playerid);
plwl = GetPlayerWantedLevel(playerid);
SetPlayerWantedLevel(playerid,plwl +10);
new b[170];
format(b, sizeof(b), "Shop bombed and also robbed %i$! NOW RUN! IT WILL EXPLODE IN 10 SECONDS!! - Wanted Level: %d",bupm[playerid],plwl);
SendClientMessage(playerid,red,b);
GameTextForPlayer(playerid, "Bombing ~r~COMPLETE! RUN NOW! IT WILL EXPLODE ALL IN 10 SECONDS!!", 5000, 5);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
IsBombing[playerid] =0;
new string3[170];
new current_zone;
current_zone = player_zone[playerid];
GetPlayerName(playerid, name, sizeof(name));
format(string3, sizeof(string3), "- SHOP BOMBING - %s (%d) has bombed a store and also robbed %i$ from %s",name,playerid,bupm[playerid],zones[current_zone][zone_name]);
SendClientMessageToAll(COLOR_WHITE,string3);
BombLog(string3);
Re: what's wrong? -
MP2 - 14.04.2012
Why did you put [playerid]? You didn't declare any dimensions ([MAX_PLAYERS]).
Re: what's wrong? -
AndreT - 14.04.2012
bupm is not an array of any kind. It is a single variable, so treat it like one.
Delete the [playerid] off it or explain in greater detail what it is that you're trying to do.
Re: what's wrong? -
Face9000 - 15.04.2012
I've fixed.