Expected token. - 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: Expected token. (
/showthread.php?tid=440765)
Expected token. -
Hand-Scripter - 31.05.2013
Hi, I got this problem:
pawn Код:
SA-MP Server\gamemodes\DRP.pwn(412) : error 001: expected token: ",", but found ";"
But, everything I try give other warnings.
pawn Код:
gPlayerLogged[playerid] = 1;
PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid));
SetPlayerPos(playerid, dini_Float(file, "Position")-GetPlayerPos(playerid, x, y, z);
SendClientMessage(playerid, COLOR_YELLOW, "You have succesfully logged in!");
When I add an extra ) to the GetPlayerPos(playerid, x, y, z));
I get the following:
pawn Код:
SA-MP Server\gamemodes\DRP.pwn(412) : warning 202: number of arguments does not match definition
SA-MP Server\gamemodes\DRP.pwn(412) : warning 202: number of arguments does not match definition
Re: Expected token. -
BossZk - 31.05.2013
which one is line 412?
Re: Expected token. -
Giroud12 - 31.05.2013
Which line?
Re: Expected token. -
Hand-Scripter - 31.05.2013
pawn Код:
SetPlayerPos(playerid, dini_Float(file, "Position")-GetPlayerPos(playerid, x, y, z);
Sorry, forgot to add.
Re: Expected token. -
BossZk - 31.05.2013
Код:
SetPlayerPos(playerid, dini_Float(file, "Position")-GetPlayerPos(playerid, x, y, z));
there should be a bracket after that
and these are the parameters of using setplayerpos:
PHP код:
SetPlayerPos(playerid,Float:x,Float:y,Float:z)
Re: Expected token. -
Hand-Scripter - 31.05.2013
If you would read the first post, I already tried that.
Re: Expected token. -
BossZk - 31.05.2013
read my edit
Re: Expected token. -
Giroud12 - 31.05.2013
pawn Код:
SetPlayerPos(playerid, dini_Float(file, "Position"))-GetPlayerPos(playerid, x, y, z);
Re: Expected token. -
BossZk - 31.05.2013
Quote:
Originally Posted by Giroud12
pawn Код:
SetPlayerPos(playerid, dini_Float(file, "Position"))-GetPlayerPos(playerid, x, y, z);
|
im pretty sure that wont work, and you need to save each individual coordinate of the position, the x, y and z
Re: Expected token. -
Hand-Scripter - 31.05.2013
Fixed. Ps, none of you made it work.