Need help with error - 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: Need help with error (
/showthread.php?tid=481523)
Need help with error -
wertboi333 - 16.12.2013
Код:
public Audio_OnClientDisconnect(playerid)
{
new string[128];
format(string,sizeof(string),"(Audio Plugin) %s(%d) has disconnected from the audio server.",GetPlayerNameEx(playerid),playerid);
SendClientMessageEx(playerid, 0xA9C4E4FF, string);
return 1;
}
And gives this error,
Код:
Current directory: C:\Users\Blaine Duncan\Desktop\U-RP [ENG - 0.3x]\gamemodes
Nexus2.pwn(3522) : error 001: expected token: ";", but found "public"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
================ READY ================
How Can I fix?
Respuesta: Need help with error -
Cerealguy - 16.12.2013
before "public" apparently lacks a ";" check, or showing the code above
Re: Respuesta: Need help with error -
wertboi333 - 16.12.2013
Could you post what it should look like?
Respuesta: Need help with error -
Cerealguy - 16.12.2013
example to give this error:
pawn Код:
new Player[MAX_PLAYERS] // missing the ";"
public asdawawdaw(playerid)
{
return 1;
}
Re: Need help with error -
wertboi333 - 16.12.2013
I'm confused on where the ";" is suppose to go, I was asking if you could take the code I provided that gave the error, and insert where the ";" should be.
Respuesta: Need help with error -
Cerealguy - 16.12.2013
error means that before the "public" should see a ";" While the above review that "public" you must be missing a ";" to previous line.
show before the "public" number and tell you where this error.
Re: Need help with error -
wertboi333 - 16.12.2013
Код:
forward Audio_OnSetPack(audiopack[])
//if you don't have the public below then uncomment the lines
/*public Audio_OnSetPack(audiopack[])
{
foreach(Player, i)
{
Audio_TransferPack(i);
}
return 1;
}*/
public Audio_OnClientDisconnect(playerid)
{
new string[128];
format(string,sizeof(string),"(Audio Plugin) %s(%d) has disconnected from the audio server.",GetPlayerNameEx(playerid),playerid);
SendClientMessageEx(playerid, 0xA9C4E4FF, string);
return 1;
}
Respuesta: Need help with error -
Cerealguy - 16.12.2013
pawn Код:
forward Audio_OnSetPack(audiopack[]) // this error
//if you don't have the public below then uncomment the lines
/*public Audio_OnSetPack(audiopack[])
{
foreach(Player, i)
{
Audio_TransferPack(i);
}
return 1;
}*/
public Audio_OnClientDisconnect(playerid)
{
new string[128];
format(string,sizeof(string),"(Audio Plugin) %s(%d) has disconnected from the audio server.",GetPlayerNameEx(playerid),playerid);
SendClientMessageEx(playerid, 0xA9C4E4FF, string);
return 1;
}
pawn Код:
forward Audio_OnSetPack(audiopack[]);
use this