SA-MP Forums Archive
error 001: expected token: ";", but found "public" - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: error 001: expected token: ";", but found "public" (/showthread.php?tid=266760)



error 001: expected token: ";", but found "public" - HayZatic - 06.07.2011

error 001: expected token: ";", but found "public" Please Help Me

Heres where the code Is wrong

Код:
public SendMSG()
{
    new randMSG = random(sizeof(RandomMSG));
    SendClientMessageToAll(0x9900FFAA, RandomMSG[randMSG]); 
	return 1;
}



Re: error 001: expected token: ";", but found "public" - Shadoww5 - 06.07.2011

In the previous line is missing a semicolon.


Re: error 001: expected token: ";", but found "public" - Jack_Leslie - 06.07.2011

Might be just me but I think there's something wrong with the code above it.


Re: error 001: expected token: ";", but found "public" - =WoR=Varth - 06.07.2011

Show us the code above that code if you still get the error.


Re: error 001: expected token: ";", but found "public" - HayZatic - 06.07.2011

Got It was the previous Line. It was suppose to be

}; Not just }