Raised This Month: $12 Target: $400
 3% 

why wont this work?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 10-19-2005 , 18:10   why wont this work?
Reply With Quote #1

Code:
/* Ice Skating Wars plugin! What does it do?: It will change the players friction so that it feels like you are walking in ice! Commands: amx_icewars <1|0> "Activates the plugin" Cvar: amx_friction < 1.0 is default and 0.1 is totally slippy> The plugin will be reset every round */  #include <amxmodx> #include <amxmisc> #include <engine> new iceskate public plugin_init() {     register_plugin("Ice skating wars", "1.0", "AtomiC")       register_clcmd ("amx_icewars", "icewars", ADMIN_LEVEL_A,"<1|0>")     register_cvar("amx_friction","0.1")     register_cvar("amx_ice_maxspeed","1000.0") } public icewars (id,level,cid) {           if (!cmd_access(id,level,cid,2))                   return PLUGIN_HANDLED           new arg[8]           read_argv(1,arg,7)           iceskate = str_to_num(arg)           if(iceskate == 1)                 {                   new players[32], inum                   get_players(players,inum)                   for(new a=0;a<inum;++a)                   entity_set_float(players[a], EV_FL_friction, get_cvar_float("amx_friction"))            set_user_maxspeed(players[a], get_cvar_float("amx_ice_maxspeed"))                 set_hudmessage(222, 70,0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 8)                   show_hudmessage(0,"Ice skating wars is now on")                   return PLUGIN_HANDLED           }           if(iceskate == 0)           {                   new players[32], inum                   get_players(players,inum)                   for(new a=0;a<inum;++a)                   entity_set_float(players[a], EV_FL_friction, 1.0)            set_user_maxspeed(players[a], 250)                 set_hudmessage(222, 70,0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 8)                   show_hudmessage(0,"Ice skating wars is now off")                   return PLUGIN_HANDLED           }           return PLUGIN_HANDLED   }   public round_start() {       if(iceskate == 1) {         entity_set_float(0, EV_FL_friction, 1.0)       }             return PLUGIN_CONTINUE   }
Code:
/home/users/amxmodx/tmp3/textPTmfiQ.sma(37) : warning 217: loose indentation
/home/users/amxmodx/tmp3/textPTmfiQ.sma(37) : error 017: undefined symbol "set_user_maxspeed"
/home/users/amxmodx/tmp3/textPTmfiQ.sma(38) : warning 217: loose indentation
/home/users/amxmodx/tmp3/textPTmfiQ.sma(48) : warning 217: loose indentation
/home/users/amxmodx/tmp3/textPTmfiQ.sma(48) : error 017: undefined symbol "set_user_maxspeed"
/home/users/amxmodx/tmp3/textPTmfiQ.sma(49) : warning 217: loose indentation
__________________
atomic is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 10-19-2005 , 18:39  
Reply With Quote #2

#include <fun>
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 10-19-2005 , 18:39  
Reply With Quote #3

OMG AHAHAHAHAH tnx
__________________
atomic is offline
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 10-19-2005 , 18:44  
Reply With Quote #4

and some errors here'
Code:
/* Ice Skating Wars plugin! What does it do?: It will change the players friction so that it feels like you are walking in ice! Commands: amx_icewars <1|0> "Activates the plugin" Cvar: amx_friction < 1.0 is default and 0.1 is totally slippy> The plugin will be reset every round */  #include <amxmodx> #include <amxmisc> #include <engine> #include <fun> new iceskate public plugin_init() {     register_plugin("Ice skating wars", "1.0", "AtomiC")       register_clcmd ("amx_icewars", "icewars", ADMIN_LEVEL_A,"<1|0>")     register_cvar("amx_friction","0.1")     register_cvar("amx_ice_maxspeed","1000.0") } public icewars (id,level,cid) {           if (!cmd_access(id,level,cid,2))                   return PLUGIN_HANDLED           new arg[8]           read_argv(1,arg,7)           iceskate = str_to_num(arg)           if(iceskate == 1)                 {                   new players[32], inum                   get_players(players,inum)                   for(new a=0;a<inum;++a)                   entity_set_float(players[a], EV_FL_friction, get_cvar_float("amx_friction"))            set_user_maxspeed (players[a], get_cvar_float("amx_ice_maxspeed"))                 set_hudmessage(222, 70,0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 8)                   show_hudmessage(0,"Ice skating wars is now on")                   return PLUGIN_HANDLED           }           if(iceskate == 0)           {                   new players[32], inum                   get_players(players,inum)                   for(new a=0;a<inum;++a)                           entity_set_float(players[a], EV_FL_friction, 1.0)                   set_hudmessage(222, 70,0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 8)            set_user_maxspeed (players[a], 250.0)                 show_hudmessage(0,"Ice skating wars is now off")                   return PLUGIN_HANDLED           }           return PLUGIN_HANDLED   }   public round_start() {       if(iceskate == 1) {         entity_set_float(0, EV_FL_friction, 1.0)       }             return PLUGIN_CONTINUE   }
Code:
/home/users/amxmodx/tmp3/textRBv3RK.sma(38) : warning 217: loose indentation
/home/users/amxmodx/tmp3/textRBv3RK.sma(38) : error 017: undefined symbol "a"
/home/users/amxmodx/tmp3/textRBv3RK.sma(39) : warning 217: loose indentation
/home/users/amxmodx/tmp3/textRBv3RK.sma(50) : warning 217: loose indentation
/home/users/amxmodx/tmp3/textRBv3RK.sma(50) : error 017: undefined symbol "a"
/home/users/amxmodx/tmp3/textRBv3RK.sma(51) : warning 217: loose indentation
__________________
atomic is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 10-19-2005 , 18:51  
Reply With Quote #5

try using different vars for the different for loops, or take off the second new a=0 because its already defined in the previous for loop.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 10-19-2005 , 18:52  
Reply With Quote #6

uhh what? please post code
__________________
atomic is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 10-19-2005 , 19:02  
Reply With Quote #7

Code:
        if(iceskate == 1)                 {                   new players[32], inum                   get_players(players,inum)  //______-------------___________ //_________Here________________                   for(new a=0;a<inum;++a)                 entity_set_float(players[a], EV_FL_friction, get_cvar_float("amx_friction"))            set_user_maxspeed (players[a], get_cvar_float("amx_ice_maxspeed"))                 set_hudmessage(222, 70,0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 8)                   show_hudmessage(0,"Ice skating wars is now on")                   return PLUGIN_HANDLED           }           if(iceskate == 0)           {                   new players[32], inum                   get_players(players,inum)  //______---------------___________ //_________And Here________________                 for(new a=0;a<inum;++a)                         entity_set_float(players[a], EV_FL_friction, 1.0)                   set_hudmessage(222, 70,0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 8)            set_user_maxspeed (players[a], 250.0)                 show_hudmessage(0,"Ice skating wars is now off")                   return PLUGIN_HANDLED           }

At those two spots in the same function you declare 'a' twice. declare it once or change one of them to a different variable i.e 'b'
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 10-19-2005 , 19:04  
Reply With Quote #8

like this?

Code:
                new players[32], inum                   get_players(players,inum)                   for(new a=0;a<inum;++a)                   entity_set_float(players[a], EV_FL_friction, get_cvar_float("amx_friction"))            set_user_maxspeed (players[a], get_cvar_float("amx_ice_maxspeed"))                 set_hudmessage(222, 70,0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 8)                   show_hudmessage(0,"Ice skating wars is now on")                   return PLUGIN_HANDLED           }           if(iceskate == 0)           {                   new players[32], inum                   get_players(players,inum)                 for(new b=0;b<inum;++b)                           entity_set_float(players[a], EV_FL_friction, 1.0)                   set_hudmessage(222, 70,0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 8)              set_user_maxspeed (players[a], 250.0)                 show_hudmessage(0,"Ice skating wars is now off")                   return PLUGIN_HANDLED           }           return PLUGIN_HANDLED
__________________
atomic is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 10-19-2005 , 19:05  
Reply With Quote #9

well then everything that you used 'a' with in that loop needs to be changed to 'b'
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 10-19-2005 , 19:18  
Reply With Quote #10

grr cant get it to work...please help me
__________________
atomic is offline
Reply



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 20:47.


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