Raised This Month: $ Target: $400
 0% 

Hello! and... understanding Pawn compiler error.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Jsanchez
New Member
Join Date: Jun 2012
Old 06-30-2012 , 14:29   Hello! and... understanding Pawn compiler error.
Reply With Quote #1

Hello folks, I know It's not so nice to introduce myself by asking for help, but if you are reading this, i wanto thank you for your time and brain cells wasted. It's my first day scripting for AMX, My Brackground knowledge is basic Perl, the "Llama" book.

I'm following this tutorial for my first AMX/Pawn script, I've battled a few compiler errors but this one just gets me. (Code is NOT EXACTLY as the tutorial says). I would laso like to know if you know some webpage for common Pawn compiler errors. this one is not so complete.

oh well, as Linus once said... "Show me the code!"

COMPILER WARNING
Code:
Warning: Expression has no effect on line 46
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Ekimino's Map Chooser" #define VERSION "0.01" #define AUTHOR "Jorge Sanchez" new roll_RandomMenu; new roll_Rolls[12]; public plugin_init() {     register_plugin("Ekimino's Map Chooser", "0.01", "Jorge Sanchez");         roll_RandomMenu = menu_create("Roll, winner picks map", "menu_handle");         register_clcmd("ekimino_roll", "start_roll", ADMIN_USER, "Gaben");         build_menu();     } //public roll_RandomMenu(id, roll_RandomMenu, item) //{ //  if(item + 1 = 1) return PLUGIN_CONTINUE;             // Get item info     //menu_item_getinfo(roll_RandomMenu, item, access, roll_Rolls, 101,"rolls",_, callback);     //} public roll_randomizar(id, roll_RandomMenu, item) {     if( item < 0 ) return PLUGIN_CONTINUE;       // Get item info     new cmd[3];     new acces, callback; // ############################################################## // ##############################################################       menu_item_getinfo(roll_RandomMenu, access, cmd, 101,"Nombre","Nombre",callback); // THIS IS LINE 46  //########################################################## //#########################################################     new iChoice = str_to_num(cmd);       cmd[iChoice]++;       return PLUGIN_HANDLED; } public start_roll(id)     {         for(new i = 0; i < 33; i++)         {             if( is_user_alive(i) )             {                 menu_display(i, roll_RandomMenu, 0);             }         }                 return PLUGIN_HANDLED;     } build_menu(){     new slot;     menu_addtext(roll_RandomMenu, "Apretar 1 para la chance de elegir mapa", slot = 0);     menu_additem(roll_RandomMenu, "Rock n' Roll!", "random(100)");     menu_setprop(roll_RandomMenu, MPROP_PERPAGE, 0); }


I still get dizzy by the language, but It's more fun to learn by doing.
Jsanchez is offline
 



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 15:03.


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