Raised This Month: $ Target: $400
 0% 

Error: expected token: ";" but found "-identifier-"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
quilhos
Veteran Member
Join Date: Jun 2010
Old 11-26-2011 , 16:11   Error: expected token: ";" but found "-identifier-"
Reply With Quote #1

Well I have a small problem in compilation:

PHP Code:
MakeTutor(id,Text[],Color,Float:Time 0.0
{
    
    
message_begin(MSG_ALL,g_MsgTutor,_,id);
    
write_string(Text);
    
write_byte(0);
    
write_short(0);
    
write_short(0);
    
write_short(1<<Color);
    
message_end();
    
    if(
Time != 0.0)
    {
        
        
set_task(Time,"RemoveTutor",id TASK_TUT);
    }
}

MsgWelcome(id,Text[],Color,Float:Time 0.0
{
    
    
message_begin(MSG_ONE_UNRELIABLE,g_MsgTutor,_,id);
    
write_string(Text);
    
write_byte(0);
    
write_short(0);
    
write_short(0);
    
write_short(1<<Color);
    
message_end();
    
    if(
Time != 0.0)
    {
        
set_task(Time,"RemoveTutor",id TASK_TUT);
    }
}

public 
RemoveTutor(taskID)
{
    
    new 
id taskID TASK_TUT
    
    
    message_begin
(MSG_ALL,g_MsgTutClose,_,id);
    
message_end();

Thanks for help
quilhos is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 11-26-2011 , 16:26   Re: Error: expected token: ";" but found "-identifier-"
Reply With Quote #2

you missed a ";"
learn to debug compiling errors next time.
it always show you which line the error occurred.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 11-26-2011 , 16:45   Re: Error: expected token: ";" but found "-identifier-"
Reply With Quote #3

Please show me where is my error post the code in the correctly form

Last edited by quilhos; 11-26-2011 at 16:46.
quilhos is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 11-26-2011 , 17:02   Re: Error: expected token: ";" but found "-identifier-"
Reply With Quote #4

PHP Code:
new id taskID TASK_TUT 
Goes to
PHP Code:
new id taskID TASK_TUT
Yours sincerely
Impact
__________________
Impact123 is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 11-26-2011 , 17:21   Re: Error: expected token: ";" but found "-identifier-"
Reply With Quote #5

new id = taskID - TASK_TUT;

thanks, but found other problem, expected token: ";" but found "-identifier-", but in another line
quilhos is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 11-26-2011 , 17:43   Re: Error: expected token: ";" but found "-identifier-"
Reply With Quote #6

what line ?
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 11-26-2011 , 18:10   Re: Error: expected token: ";" but found "-identifier-"
Reply With Quote #7

Quote:
Originally Posted by quilhos View Post
new id = taskID - TASK_TUT;

thanks, but found other problem, expected token: ";" but found "-identifier-", but in another line
It's the exact same problem, is it that hard to replicate the fix, adding ; on the end of that line ?

But still, amxx compile doesn't require a ; by default, you have a #pragma semicolon (or something) in your code that requires it, just remove that and you don't have to worry about ; anymore.
__________________

Last edited by Hunter-Digital; 11-26-2011 at 18:11.
Hunter-Digital is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 11-26-2011 , 18:15   Re: Error: expected token: ";" but found "-identifier-"
Reply With Quote #8

At the beginning gave me two errors equal (Error: expected token: ";" but found "-identifier-"), but one is solved, but the other still remains.

Solved:
PHP Code:
 new id taskId TASK_TUT

I don't know what's the other problem

Last edited by quilhos; 11-26-2011 at 18:16.
quilhos is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 08:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode