AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Compiling Issues. BMR (https://forums.alliedmods.net/showthread.php?t=98582)

malec321 07-26-2009 22:31

Compiling Issues. BMR
 
1 Attachment(s)
Hey guys.. I was just needing help on my new BLOCKMAKER-REMIX I'VE coded.

Current Compile Errors:

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

/home/groups/amxmodx/tmp3/php1HvRZc.sma(293) : warning 201: redefinition of constant/macro (symbol "BM_TRAMPOLINE")
/home/groups/amxmodx/tmp3/php1HvRZc.sma(2498) : error 010: invalid function or declaration
/home/groups/amxmodx/tmp3/php1HvRZc.sma(5226) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/php1HvRZc.sma(5237) : error 017: undefined symbol "blockCount"
/home/groups/amxmodx/tmp3/php1HvRZc.sma(5237) : error 017: undefined symbol "blockCount"
/home/groups/amxmodx/tmp3/php1HvRZc.sma(5237) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp3/php1HvRZc.sma(5237) : fatal error 107: too many error messages on one line

..

SMA is below.

fysiks 07-26-2009 23:04

Re: Compiling Issues. BMR
 
It tells you what line the error occurs on, so just go to that line and look at it. It seems that most of the time the problem is non-paired braces. If one doesn't have a pair then something is wrong there, either you left one out or you put in an extra one.

I fixed all the errors but there are like a million warnings (for unused variables) :|.

Code:

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

C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(293) : warning 201: redefinition of constant/macro (sym
bol "BM_TRAMPOLINE")
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5412) : warning 204: symbol is assigned a value that is
 never used: "vTimerAngles"
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5412) : warning 204: symbol is assigned a value that is
 never used: "vTimerOrigin"
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5412) : warning 204: symbol is assigned a value that is
 never used: "bTimerStart"
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5490) : warning 203: symbol is never used: "getFileCont
ents"
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5490) : warning 203: symbol is never used: "htmlFriendl
y"
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5490) : warning 203: symbol is never used: "longJumpCre
ate"
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5490) : warning 203: symbol is never used: "longJumpDis
tance"
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5490) : warning 203: symbol is never used: "longJumpRot
ate"
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5490) : warning 203: symbol is never used: "measureTool
SelectBlock"
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5490) : warning 203: symbol is never used: "measureTool
SelectPos"
C:\Program Files\Games\Steam\steamapps\beougher\counter-strike\cstrike\addons\am
xmodx\scripting\temp.sma(5490) : warning 203: symbol is never used: "toggleMeasu
reTool"
Header size:          3472 bytes
Code size:          131732 bytes
Data size:          139688 bytes
Stack/heap size:      16384 bytes; max. usage is unknown, due to recursion
Total requirements:  291276 bytes

12 Warnings.
Done.


malec321 07-26-2009 23:21

Re: Compiling Issues. BMR
 
1 Attachment(s)
Fixed Most. I think?

And what does

redefinition of constant/macro (symbol "BM_TRAMPOLINE")

Mean? I went to the line found nothing?

/home/groups/amxmodx/tmp3/phpzWdIGn.sma(286) : warning 201: redefinition of constant/macro (symbol "BM_TRAMPOLINE")
/home/groups/amxmodx/tmp3/phpzWdIGn.sma(5198) : error 010: invalid function or declaration


New SMA please check.

fysiks 07-26-2009 23:40

Re: Compiling Issues. BMR
 
Code:
enum {     BM_PLATFORM,        //A     BM_BHOP,        //B     BM_DAMAGE,      //C     BM_HEALER,      //D     BM_NOFALLDAMAGE,    //E     BM_ICE,         //F     BM_TRAMPOLINE,      //G     BM_SPEEDBOOST,      //H     BM_INVINCIBILITY,   //I     BM_STEALTH,     //J     BM_DEATH,       //K     BM_HE,          //L     BM_CAMOUFLAGE,      //M     BM_LOWGRAVITY,      //N     BM_FIRE,        //O     BM_SLAP,        //P     BM_RANDOM,      //Q     BM_HONEY,       //R     BM_BARRIER_CT,      //S     BM_BARRIER_T,       //T     BM_BOOTSOFSPEED,    //U     BM_GLASS,       //V     BM_DUCK,        //W     BM_SALTO,       //X (LOW)     BM_TRAMPOLINE,      //Y (MED)     BM_ASS,         //Z (HIGH)      BM_FROST,       //1     BM_FLASH,       //2     BM_DELAYED,     //3     BM_MONEY,       //4     BM_DEAGLE,      //5     BM_AWP,         //6     BM_GRAVITY,     //7     BM_BLIND,       //8     BM_BLINDFAST,       //9     BM_AK47,        //a     BM_M4A1         //b };


Code:
drawLine(Float:vOrigin1[3], Float:vOrigin2[3], life) {     message_begin(MSG_BROADCAST, SVC_TEMPENTITY);     write_byte(TE_BEAMPOINTS);     write_coord(floatround(vOrigin1[0], floatround_floor));     write_coord(floatround(vOrigin1[1], floatround_floor));     write_coord(floatround(vOrigin1[2], floatround_floor));     write_coord(floatround(vOrigin2[0], floatround_floor));     write_coord(floatround(vOrigin2[1], floatround_floor));     write_coord(floatround(vOrigin2[2], floatround_floor));     write_short(gSpriteIdBeam);     //sprite index     write_byte(0);              //starting frame     write_byte(1);              //frame rate in 0.1's     write_byte(life);           //life in 0.1's     write_byte(5);              //line width in 0.1's     write_byte(0);              //noise amplitude in 0.01's     write_byte(255);            //red     write_byte(255);            //green     write_byte(255);            //blue     write_byte(255);            //brightness     write_byte(0);              //scroll speed in 0.1's     message_end(); }     return false; }

malec321 07-27-2009 00:30

Re: Compiling Issues. BMR
 
1 Attachment(s)
/home/groups/amxmodx/tmp3/phpysN8GP.sma(3365) : error 001: expected token: ";", but found "}"
/home/groups/amxmodx/tmp3/phpysN8GP.sma(3460) : error 088: number of arguments does not match definition
/home/groups/amxmodx/tmp3/phpysN8GP.sma(5213) : warning 217: loose indentation

Update but failed once again =(

sry. new sma

fysiks 07-27-2009 01:11

Re: Compiling Issues. BMR
 
It looks like you keep changing/adding random stuff and don't know what you are doing.

You MUST use semi-colons at the end of lines that are not control structures because of #pragma semicolon 1 (or something like that).

malec321 07-28-2009 00:23

Re: Compiling Issues. BMR
 
1 Attachment(s)
I know what im doing.. I fixed everything just the brackets.. Thats like one thing I really don't get. I have 2 opening brackets and 2 closing so what am I possibly doing wrong?..

Maybe wrong places?

Bugsy 07-28-2009 00:26

Re: Compiling Issues. BMR
 
fysiks is correct. If you would listen to what he tells you this would be solved already.

Ala
PHP Code:

#pragma semicolon 1; 

Error
Code:
Revive(id) {     //make sure player has access to this command     if (get_user_flags(id) & BM_ADMIN_LEVEL)     {         //Better to only call these if we need the users name         new szName[32];         get_user_name(id, szName, 32);         //MISSING SEMI-COLONS         ExecuteHam(Ham_Respawn, id)         client_print(0, print_chat, "%s revived.", szName)     } }

Warning
Code:
/* MISC */ drawLine(Float:vOrigin1[3], Float:vOrigin2[3], life) {     message_begin(MSG_BROADCAST, SVC_TEMPENTITY);     write_byte(TE_BEAMPOINTS);     write_coord(floatround(vOrigin1[0], floatround_floor));     write_coord(floatround(vOrigin1[1], floatround_floor));     write_coord(floatround(vOrigin1[2], floatround_floor));     write_coord(floatround(vOrigin2[0], floatround_floor));     write_coord(floatround(vOrigin2[1], floatround_floor));     write_coord(floatround(vOrigin2[2], floatround_floor));     write_short(gSpriteIdBeam);     //sprite index     write_byte(0);              //starting frame     write_byte(1);              //frame rate in 0.1's     write_byte(life);           //life in 0.1's     write_byte(5);              //line width in 0.1's     write_byte(0);              //noise amplitude in 0.01's     write_byte(255);            //red     write_byte(255);            //green     write_byte(255);            //blue     write_byte(255);            //brightness     write_byte(0);              //scroll speed in 0.1's     message_end(); //??????????? Remove this crap     {     return false;     } }

malec321 07-28-2009 02:06

Re: Compiling Issues. BMR
 
Worked...No warnings no error compiled great, server wont start though. =(

any ideas why?

fysiks 07-28-2009 02:11

Re: Compiling Issues. BMR
 
Do you get any errors? (amx logs and/or server console)


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

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