AlliedModders

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

RPRaiden 07-16-2004 14:33

Compiling
 
When I compile my sma i get a "alias.asm" and the amx file is 0 bytes big, the compiler doesnt show if it finished or not

Code:
/* * ALIAS MOD FOR TSRP * AUTHOR: RPRAIDEN ( <a href="mailto:[email protected]">[email protected]</a> ) * DATE: 16th July 2004 * Version History: * // 0.1 Beta * //========== * - Changed connect function to putinserver * - Hud Message Announcements Installed * - Installed Think Function * - Implemented Greet function * - Implemented handlesay function */ #include <amxmodx>   new alias[32] new TargetID[33] new Tid new Body new know_alias new target_alias new unknown_alias = "???" new link[33] public plugin_init(){     register_plugin("Alias Mod","0.1","RPRaiden")     set_task(0.1, "alias_think", 32, "", 0, "b")     register_concmd("say","handlesay",ACCESS_ALL) } public client_putinserver(id) {     get_user_info(id, "name",alias, 32)     set_hudmessage(175,0,0,-1.0,-0.45,0,0.0,5.0,0.0,0.0,3);     show_hudmessage(id,"ALIAS: %s has entered the building!", alias);     return PLUGIN_HANDLED } public client_infochanged(id) {     new old_alias[33]     new new_alias[33]     alias = old_alias     get_user_info(id, "name", new_alias,32)     get_user_name(id,old_alias,32)     set_hudmessage(175,0,0,-1.0,-0.45,0,0.0,5.0,0.0,0.0,3);     show_hudmessage(id,"ALIAS: %s has changed his alias",old_alias);        new_alias = alias     return PLUGIN_HANDLED } public client_disconnect(id) {     set_hudmessage(175,0,0,-1.0,-0.45,0,0.0,5.0,0.0,0.0,3);     show_hudmessage(id,"ALIAS: %s has left the building!",alias);     return PLUGIN_HANDLED } public alias_think(id) {     get_user_aiming (id, TargetID, Body, [400] )     if (!TargetID){     return PLUGIN_HANDLED     TargetID[id] = tid     get_user_info (tid, "alias", target_alias, 32)     if (know_alias != 1){         set_hudmessage(0,175,0,-1.0,-0.75,0,0.0,0.1,0.0,0.0,3);         show_hudmessage(id,"ALIAS: %s",unknown_alias);     } else {         set_hudmessage(0,175,0,-1.0,-0.75,0,0.0,0.1,0.0,0.0,3);         show_hudmessage(id,"ALIAS: %s",target_alias);     }     return PLUGIN_HANDLED } public alias_greet(id) {     get_user_aiming (id, TargetID, Body, [400] )     if (!TargetID){         client_print("id","print_center","[ALIAS] Sorry, there is nobody to greet")         return PLUGIN_HANDLED     }     link[id] = know_alias     TargetID[id] = tid         if (know_alias == 1){         client_print("id","print_center","[ALIAS] Sorry, you already know there alias")         return PLUGIN_HANDLED     } else {         know_alias = 1         server_exec("Speak Hello")         client_print("id","print_center","[ALIAS] You got there alias, well done.")         return PLUGIN_HANDLED     } } public handlesay(id) {     new greet[256]     read_argv(1,buffer,255);     if(equal(greet,"/greet")) {         set_task(0.1,"alias_greet")         return PLUGIN_HANDLED;     }     if(equal(greet,"/hi")) {         set_task(0.1,"alias_greet")         return PLUGIN_HANDLED;     }     if(equal(greet,"/hello")) {         set_task(0.1,"alias_greet")         return PLUGIN_HANDLED;     }     if(equal(greet,"/hiya")) {         set_task(0.1,"alias_greet")         return PLUGIN_HANDLED;     }     if(equal(greet,"/greetings")) {         set_task(0.1,"alias_greet")         return PLUGIN_HANDLED;     }     if(equal(greet,"/alias")) {         set_task(0.1,"alias_greet")         return PLUGIN_HANDLED;     }     return PLUGIN_HANDLED }

rompom7 07-16-2004 23:29

In compile.bat rem out all the "cls" and see what it says. Most likely it will say something about a memory error.

Freecode 07-16-2004 23:41

whats this [400]?
Code:
 get_user_aiming (id, TargetID, Body, [400] )

RPRaiden 07-17-2004 08:09

Distance (I guessed it was in [ ] since the function info said [9999] max)

Anyway found lots of bugs and decided to remake it

BAILOPAN 07-17-2004 09:16

[ 9999 ] doesn't mean put it in brackets, it means the option can be excluded for a default value of 9999

native get_user_aiming (id, TargetID, Body, [9999]);

Means:
get_user_aiming (id, TargetID, Body) is:
get_user_aiming (id, TargetID, Body, 9999)
but
get_user_aiming (id, TargetID, Body, 400)
is valid.


All times are GMT -4. The time now is 14:38.

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