[need help]Spawninfo
#1

I am trying to set spawn for my server by this way:
Код:
SetSpawnInfo(playerid, 0, 23, 1337, 1676.70000, 1448.50000, 10.40000,0.00000,0.00000,0.00000, PlayerInfo[playerid][pSkin], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
And I got this errors:
Код:
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 213: tag mismatch
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 213: tag mismatch
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 213: tag mismatch
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 202: number of arguments does not match definition
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 202: number of arguments does not match definition
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 202: number of arguments does not match definition
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 202: number of arguments does not match definition
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 202: number of arguments does not match definition
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 202: number of arguments does not match definition
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 202: number of arguments does not match definition
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 202: number of arguments does not match definition
Please tell me what should I fix!
Reply
#2

Look up the syntax for SetSpawnInfo.
Reply
#3

I don't understand. Can you explain a bit more? I am beginner, so...
Reply
#4

http://lmgtfy.com/?q=SetPlayerInfo+Sa-Mp
Reply
#5

I checked that, man. I do everything as it says but still some warnings.
Reply
#6

Код:
    SetSpawnInfo(playerid, 0, 120, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ], 0, 0, 0, 0, 0, 0, 0);
That is an example of SetSpawnInfo, you are setting your skin in a random place and have way to many "0"
Reply
#7

Now it looks like this:
Код:
SetSpawnInfo(playerid, 0, 0, 120, PlayerInfo[playerid][1337], PlayerInfo[playerid][1676.70000], PlayerInfo[playerid][1448.50000], PlayerInfo[playerid][10.40000], 0, 0, 0, 0, 0, 0, 0, PlayerInfo[playerid][pSkin];
But still few errors:
Код:
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 213: tag mismatch
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 202: number of arguments does not match definition
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : error 001: expected token: ",", but found ";"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#8

Take out that PPlayerInfo[playerid][pSkin], That needs to be at the 2nd "0"
Reply
#9

Now I made it like you said:
Код:
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][59], PlayerInfo[playerid][1337], PlayerInfo[playerid][1676.70000], PlayerInfo[playerid][1448.50000], PlayerInfo[playerid][10.40000], 0, 0, 0, 0, 0, 0, 0);
There are still few errors:
Код:
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : warning 213: tag mismatch
C:\Users\Juričak\Desktop\CoF-RP v0.1\gamemodes\lvrp.pwn(447) : error 032: array index out of bounds (variable "PlayerInfo")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Help me finish this and you'll get +1 rep from me!
Reply
#10

Change PlayerInfo[playerid][59]
to just 59
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)