AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Invalid line continuation (https://forums.alliedmods.net/showthread.php?t=216271)

Smatify 05-18-2013 17:46

Invalid line continuation
 
Hi,

I have a strange problem:
Code:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Invalid line continuation on line 21

1 Error.

Line 21:
PHP Code:

register_plugin(PLUGINVERSIONAUTHOR

Can someone help me?

ConnorMcLeod 05-18-2013 18:00

Re: Invalid line continuation
 
Are we supposed to guess the rest of code ?

Smatify 05-18-2013 18:03

Re: Invalid line continuation
 
Quote:

Originally Posted by ConnorMcLeod (Post 1954146)
Are we supposed to guess the rest of code ?

Well, i have only a short part and its buggy

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>


#define PLUGIN "Squadtrainer - Core"
#define VERSION "1.0"
#define AUTHOR "UnitedDevs"

new game_desc
new user_name[32]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
// COMMANDS \\
    
register_clcmd("say /rr""rr"ADMIN_RCON)
    
register_clcmd("say /restart""rr"ADMIN_RCON)
    
register_clcmd("say /live""live"ADMIN_RCON)
}


public 
rr(id
{
    
get_user_name(iduser_namecharsmax(user_name))
    
server_cmd("sv_restartround 10""timer")
    
set_hudmessage(255255255,0.350.300.12.51.01.04)
    
show_hudmessage(id"%s restarted the Game"user_name)
}

public 
timer()
{
    
client_cmd(0,"spk ^"vox_login(e51_comma(e5that(s30e40apprehend(s10e25apprehend(s10e25ninety(s60hour _comma get red(e80ninety(s45in^"")
    
set_task(8.0,"ten")
    
set_task(9.0,"nine")
    
set_task(10.0,"eight")
    
set_task(11.0,"seven")
    
set_task(12.0,"six")
    
set_task(13.0,"five")
    
set_task(14.0,"four")
    
set_task(15.0,"three")
    
set_task(16.0,"two")
    
set_task(17.0,"one")
}



public 
ten(id)
{
    new 
display[64];
    
format(display63"The Game will restart in 10 seconds")
    
set_hudmessage(random(255), random(255), random(255), 0.350.300.12.51.01.04);
    
show_hudmessage(0display);
}

public 
nine(id)
{
    new 
display[64];
    
format(display63"The Game will restart in 9 seconds")
    
set_hudmessage(random(255), random(255), random(255), 0.350.300.12.51.01.04);
    
show_hudmessage(0display);
}

public 
eight(id)
{
    
client_cmd(0,"spk eight")
    new 
display[64];
    
format(display63"The Game will restart in 8 seconds")
    
set_hudmessage(random(255), random(255), random(255), 0.350.300.12.51.01.04);
    
show_hudmessage(0display);
}

public 
seven(id)
{
    
client_cmd(0,"spk seven")
    new 
display[64];
    
format(display63"The Game will restart in 7 seconds")
    
set_hudmessage(random(255), random(255), random(255), 0.350.300.12.51.01.04);
    
show_hudmessage(0display);
}

public 
six(id)
{
    
client_cmd(0,"spk six")
    new 
display[64];
    
format(display63"The Game will restart in 6 seconds")
    
set_hudmessage(random(255), random(255), random(255), 0.350.300.12.51.01.04);
    
show_hudmessage(0display);
}

public 
five(id)
{
    
client_cmd(0,"spk five")
    new 
display[64];
    
format(display63"The Game will restart in 5 seconds")
    
set_hudmessage(random(255), random(255), random(255), 0.350.300.12.51.01.04);
    
show_hudmessage(0display);
}

public 
four(id)
{
    
client_cmd(0,"spk four")
    new 
display[64];
    
format(display63"The Game will restart in 4 seconds")
    
set_hudmessage(random(255), random(255), random(255), 0.350.300.12.51.01.04);
    
show_hudmessage(0display);
}

public 
three(id)
{
    
client_cmd(0,"spk three")
    new 
display[64];
    
format(display63"The Game will restart in 3 seconds")
    
set_hudmessage(random(255), random(255), random(255), 0.350.300.12.51.01.04);
    
show_hudmessage(0display);
}

public 
two(id)
{
    
client_cmd(0,"spk two")
    new 
display[64];
    
format(display63"The Game will restart in 2 seconds")
    
set_hudmessage(random(255), random(255), random(255), 0.350.300.12.51.01.04);
    
show_hudmessage(0display);
}

public 
one(id)
{
    
client_cmd(0,"spk one")
    new 
display[64];
    
format(display63"The Game will restart in 1 seconds")
    
set_hudmessage(random(255), random(255), random(255), 0.350.300.12.51.01.04);
    
show_hudmessage(0display);



hleV 05-18-2013 18:07

Re: Invalid line continuation
 
It's because of the comment:
Code:
// COMMANDS \\
Not sure why would that apply in the comments, but symbol "\" means that you're gonna continue on the next line, but there's an additional "\" in the same line.

ConnorMcLeod 05-18-2013 18:07

Re: Invalid line continuation
 
Don't use '\' char and all is fine.

Smatify 05-18-2013 18:09

Re: Invalid line continuation
 
Quote:

Originally Posted by hleV (Post 1954150)
It's because of the comment:
Code:
// COMMANDS \\
Not sure why would that apply in the comments, but symbol "\" means that you're gonna continue on the next line, but there's an additional "\" in the same line.

lol...I am so stupid -.-


All times are GMT -4. The time now is 16:28.

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