AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Dumb syntax error (https://forums.alliedmods.net/showthread.php?t=274221)

redivcram 11-04-2015 06:12

Dumb syntax error
 
#define TASK_COUNTUP 12345;
:arrow:
#define TADK_COUNTUP 12345

PHP Code:

public EvSpawn(id)
{
gTimerS[id] = 0;

if(
task_exists(TASK_COUNTUP id)) // line 50, TASK_COUNTUP defined as 12345;
{
remove_task(TASK_COUNTUP id);
}

if(
get_user_team(id) == 2)
{
Start(id);
}



Error:
Code:

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

entity_solid.sma(50) : error 001: expected token: ",", but found ";"
entity_solid.sma(50) : error 036: empty statement
entity_solid.sma(50) : error 029: invalid expression, assumed zero
entity_solid.sma(50) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.


fysiks 11-04-2015 09:39

Re: Dumb syntax error
 
The compiler doesn't make mistakes. Are you sure that that is line 50?

redivcram 11-04-2015 14:17

Re: Dumb syntax error
 
I did something to confuse it.
Yes.. I checked before I even posted this

Edit: It appears that I, the genius, have put a semicolon when defined task hud

:}

fysiks 11-04-2015 20:39

Re: Dumb syntax error
 
Quote:

Originally Posted by redivcram (Post 2359788)
Solved

Dear beginners.. never use semicolons when defining.

  1. Don't remove your post. Simply add your solution to your post.
  2. Your claimed solution (the one that you posted) doesn't make sense. You should give an example.


All times are GMT -4. The time now is 18:07.

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