30.08.2009, 20:14
Right, i'm trying a different kinda of class slection code thingy,
Here is my diff pieces of code:
and here is the other parts of it:
and I'm getting the following errors, I've been trying for a while, any ideas?
Ashley
Here is my diff pieces of code:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerClass(playerid, classid);
SetupPlayerForClassSelection(playerid);
gPlayerClass[playerid] = classid;
switch (classid) {
case 0:
{
GameTextForPlayer(playerid, "~b~Test Spawn", 500, 3);
PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
}
case 1:
{
GameTextForPlayer(playerid, "~b~Test Spawn Two.", 500, 3);
PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
}
}
return 1;
}
pawn Код:
SetupPlayerForClassSelection(playerid)
{
TogglePlayerControllable(playerid,0)
SetPlayerPos(playerid, 1498.7487,-945.5091,51.2734);
SetPlayerCameraPos(playerid, 1502.2191,-943.7787,51.2934);
SetPlayerCameraLookAt(playerid, 1498.7487,-945.5091,51.2734);
SetPlayerFacingAngle(playerid,280);
return 1;
}
SetPlayerClass(playerid, classid)
{
switch(classid) {
if (classid == 0)
{
pTeam[playerid] = TEAM_PILOT;
}
if (classid == 1)
pTeam[playerid] = TEAM_TEST;
}
}
Код:
C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(808) : error 001: expected token: ";", but found "-identifier-" C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(818) : error 002: only a single statement (or expression) can follow each "case" C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(818 -- 819) : error 029: invalid expression, assumed zero C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(819) : warning 217: loose indentation C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(820) : error 029: invalid expression, assumed zero C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(823) : error 029: invalid expression, assumed zero C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(826) : warning 203: symbol is never used: "PlayerInfo" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.