SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 06/07/2011, 02:35 AM   #1
HayZatic
Banned
 
Join Date: Jun 2011
Posts: 241
Reputation: 2
Default error 001: expected token: ";", but found "public"

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

Heres where the code Is wrong

Code:
public SendMSG()
{
    new randMSG = random(sizeof(RandomMSG));
    SendClientMessageToAll(0x9900FFAA, RandomMSG[randMSG]); 
	return 1;
}
HayZatic is offline  
Old 06/07/2011, 02:38 AM   #2
Shadoww5
High-roller
 
Join Date: Apr 2011
Posts: 2,201
Reputation: 63
Default Re: error 001: expected token: ";", but found "public"

In the previous line is missing a semicolon.
Shadoww5 is offline  
Old 06/07/2011, 02:38 AM   #3
Jack_Leslie
High-roller
 
Jack_Leslie's Avatar
 
Join Date: Feb 2011
Location: Australia
Posts: 1,219
Reputation: 98
Default Re: error 001: expected token: ";", but found "public"

Might be just me but I think there's something wrong with the code above it.
__________________
lol
Jack_Leslie is offline  
Old 06/07/2011, 02:40 AM   #4
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 2,025
Reputation: 130
Default Re: error 001: expected token: ";", but found "public"

Show us the code above that code if you still get the error.
__________________
(RETIRED)
=WoR=Varth is offline  
Old 06/07/2011, 02:42 AM   #5
HayZatic
Banned
 
Join Date: Jun 2011
Posts: 241
Reputation: 2
Default Re: error 001: expected token: ";", but found "public"

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

}; Not just }
HayZatic is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error 001: expected token: ";", but found "-identifier-" matwz Scripting Help 23 26/08/2017 04:30 PM
D:\Mis documentos\Server\gamemodes\lscnr.pwn(30602) : error 001: expected token: ",", but found ";" [M]xFire Help Archive 3 27/08/2010 08:11 PM
error 001: expected token: "}", but found "enum" pryor94 Help Archive 4 19/08/2010 10:09 PM
error 001: expected token: "-string end-", but found "-identifier-" cdcyborg Help Archive 1 14/11/2009 07:22 AM


All times are GMT. The time now is 08:45 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.