Posts: 414
Threads: 93
Joined: Dec 2010
Quote:
Originally Posted by CmZxC
pawn Code:
if(positionx[playerid] != 0 && positiony[playerid] !=0 && positionz[playerid] != 0); { SetPlayerPos(playerid, 1676.8462, 1447.7908, 10.7833); } else { SetPlayerPos(playerid,positionx,positiony,position z); }
maybe switch != 0 into == 0..
you check if its not 0 then you spawn him at your default spawn.
AND you have to add
pawn Code:
positionx = dini_Int(Pos(playerid), "PositionX"); positiony = dini_Int(Pos(playerid), "PositionY"); positionz = dini_Int(Pos(playerid), "PositionZ");
at the spawn too.
so result :
pawn Code:
public OnPlayerSpawn(playerid) { positionx = dini_Int(Pos(playerid), "PositionX"); positiony = dini_Int(Pos(playerid), "PositionY"); positionz = dini_Int(Pos(playerid), "PositionZ"); if(positionx[playerid] != 0 && positiony[playerid] !=0 && positionz[playerid] != 0); { SetPlayerPos(playerid,positionx,positiony,position z); } else { SetPlayerPos(playerid, 1676.8462, 1447.7908, 10.7833); } return 1; }
|
C:\Users\Desktop\New folder\pawno\pos.pwn(51) : error 028: invalid subscript (not an array or too many subscripts): "positionx"
C:\Users\Desktop\New folder\pawno\pos.pwn(51) : warning 215: expression has no effect
C:\Users\Desktop\New folder\pawno\pos.pwn(51) : error 001: expected token: ";", but found "]"
C:\Users\Desktop\New folder\pawno\pos.pwn(51) : error 029: invalid expression, assumed zero
C:\Users\Desktop\New folder\pawno\pos.pwn(51) : fatal error 107: too many error messages on one line
its giving me these errors