errors ?? - 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: errors ?? (
/showthread.php?tid=456677)
errors ?? -
kaos999 - 06.08.2013
what am i doing wrong i posted on here and some one told me to do this and i got errors how can i fix this or is completely wrong??
Код:
new PlayerWeapon[MAX_PLAYERS][12];
new PlayerWeaponAmmo[MAX_PLAYERS][12];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid =GetPlayerVehicleID(playerid);
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof pname);
if (newstate == PLAYER_STATE_DRIVER)
{
for( new i; i != sizeof vcar; i++ )
{
if (vehicleid == vcar[i])
{
if(strcmp(pname, vcar_names[i], true) == 0)
{
SendClientMessage(playerid, COLOR_RED, "WELCOME VIP");
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "THIS VEHICLE DOES NOT BELONG TO YOU");
}
}
}
}
return 1;
}
if (newstate==PLAYER_STATE_DRIVER){ // line 1476
for(new i=0;i<12;i++){
GetPlayerWeaponData(playerid, i, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]);
}
ResetPlayerWeapons(playerid);
}
if (newstate==PLAYER_STATE_ONFOOT && oldstate==PLAYER_STATE_DRIVER){
for(new i=0;i<12;i++){
GivePlayerWeapon(playerid, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]);
}
}
return 1;
}
can some one fix this?
edit:
Код:
:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(1476) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(1477) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(1482) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(1483) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(1487) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(3159) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(3542) : warning 203: symbol is never used: "PlayerWeapon"
C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(3542) : warning 203: symbol is never used: "PlayerWeaponAmmo"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Re: errors ?? -
FireWarrior101 - 06.08.2013
can u tell us the errors
Re: errors ?? -
kaos999 - 06.08.2013
Quote:
Originally Posted by FireWarrior101
can u tell us the errors
|
yes sorry i add them
Re: errors ?? -
Youarex - 06.08.2013
Code starting on line 1476 appears to be outside of any callbacks or functions.
Re: errors ?? -
kaos999 - 06.08.2013
im a newb scripter explain in detail please
Re: errors ?? -
kaos999 - 07.08.2013
its done thanks remove or lock topic /lock