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

compiling wont work please help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
egbertjan
Senior Member
Join Date: Mar 2007
Location: The Netherlands
Old 05-25-2008 , 16:13   compiling wont work please help
Reply With Quote #1

please help me to complile this and if you had the time please also explain what i did wrong thanks already
Attached Files
File Type: sma Get Plugin or Get Source (sh_fans.sma - 667 views - 10.9 KB)

Last edited by egbertjan; 05-26-2008 at 04:44.
egbertjan is offline
Zul Rivers
Member
Join Date: May 2008
Old 05-25-2008 , 19:23   Re: compiling wont work please help
Reply With Quote #2

?? it seems to compile properly no error..
__________________
Projects:
Superhero: Hydrogen [Completed]
Superhero: Liberty Lad [Incomplete]


No Longer AMX Scripting, I Suck At It.
Zul Rivers is offline
Artenis
Member
Join Date: Mar 2008
Old 05-26-2008 , 03:39   Re: compiling wont work please help
Reply With Quote #3

Well all the errors were in one line lmao....

Well heres the script.. (amx was too big lol)

Just compile it and bam youve got a working hero..
Attached Files
File Type: txt fans.txt (11.0 KB, 109 views)
Artenis is offline
egbertjan
Senior Member
Join Date: Mar 2007
Location: The Netherlands
Old 05-26-2008 , 03:55   Re: compiling wont work please help
Reply With Quote #4

I'm sorry but when I run this in my server it still doesn't work I placed the fans.txt into my fans.sma file and tried to compile it but still it's not working any idea why? please explain

Last edited by egbertjan; 05-26-2008 at 04:01.
egbertjan is offline
Zul Rivers
Member
Join Date: May 2008
Old 05-26-2008 , 04:19   Re: compiling wont work please help
Reply With Quote #5

somethings u should change..

Code:
public fans_init() {
    new temp[6]; //declare a temperary varriable
    read_argv(1,temp,5); //reading the first argument will give you the id of the person who selected your hero
    new id = str_to_num(temp); //transfer the string returned into a number and store it as the id
    
    read_argv(2,temp,5); //second argument is whether they have the power or not
    new hasPowers = str_to_num(temp);
    
    gHasfansPower[id] = (hasPowers != 0); //(hasPowers != 0) will either return 1 (if it is true that hasPowers != 0), or 0 (if it is false that hasPowers != 0)
    if (!hasPowers && gHasfansPower[id] && is_user_alive(id)) { //check if they had power but dont know and are alive
        shRemHealthPower(id); //remove health power if this is the case
    }
    if (!hasPowers && gHasfansPower[id] && is_user_alive(id)) { //check if they had power but dont know and are alive
        shRemArmorPower(id); //remove armor power if this is the case
    }
    if (!hasPowers && gHasfansPower[id] && is_user_alive(id)) { //check if they had power but dont know and are alive
        shRemGravityPower(id); //remove gravity power if this is the case
    }    
    if (!hasPowers && gHasfansPower[id] && is_user_alive(id)) { //check if they had power but dont know and are alive
        shRemSpeedPower(id); //remove speed power if this is the case
    }
to

Code:
public fans_init() {
    new temp[6]
    read_argv(1,temp,5)
    new id = str_to_num(temp)
    
    read_argv(2,temp,5)
    new hasPowers = str_to_num(temp)
    
    gHasfansPower[id] = (hasPowers != 0)
    if (!hasPowers && gHasfansPower[id] && is_user_alive(id))
    shRemHealthPower(id)
    shRemArmorPower(id)
    shRemGravityPower(id)
    shRemSpeedPower(id)
}
you dun need to repeat those checks again and again..
__________________
Projects:
Superhero: Hydrogen [Completed]
Superhero: Liberty Lad [Incomplete]


No Longer AMX Scripting, I Suck At It.

Last edited by Zul Rivers; 05-26-2008 at 04:23.
Zul Rivers is offline
egbertjan
Senior Member
Join Date: Mar 2007
Location: The Netherlands
Old 05-26-2008 , 04:41   Re: compiling wont work please help
Reply With Quote #6

it didn't work the compiler still gives the same errors. But thanks for the shorting ;)
I really wanna learn scripting my own heroes

Last edited by egbertjan; 05-26-2008 at 04:44.
egbertjan is offline
Zul Rivers
Member
Join Date: May 2008
Old 05-26-2008 , 05:47   Re: compiling wont work please help
Reply With Quote #7

if you want a hero tell me some details i can make an example for u
cause ur hero has lots of mistakes to fix
__________________
Projects:
Superhero: Hydrogen [Completed]
Superhero: Liberty Lad [Incomplete]


No Longer AMX Scripting, I Suck At It.
Zul Rivers is offline
egbertjan
Senior Member
Join Date: Mar 2007
Location: The Netherlands
Old 05-26-2008 , 05:57   Re: compiling wont work please help
Reply With Quote #8

OK thanks i guess I wish to know the mistakes

I wanted to make a hero with 10 exploding AWP bullets and 300 hp / ap I dont care about the grav and I want to get the AWP in the beginning of the round and unlimmited bullets.

BTW my compiler says there are 4 errors... so why are there so many mistakes?

Last edited by egbertjan; 05-26-2008 at 06:00.
egbertjan is offline
Zul Rivers
Member
Join Date: May 2008
Old 05-26-2008 , 06:36   Re: compiling wont work please help
Reply With Quote #9

nvm, i'll try fix it.. but im not sure when
__________________
Projects:
Superhero: Hydrogen [Completed]
Superhero: Liberty Lad [Incomplete]


No Longer AMX Scripting, I Suck At It.

Last edited by Zul Rivers; 05-26-2008 at 06:45.
Zul Rivers is offline
egbertjan
Senior Member
Join Date: Mar 2007
Location: The Netherlands
Old 05-26-2008 , 07:16   Re: compiling wont work please help
Reply With Quote #10

OK I hope to get it soon.
egbertjan 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 01:04.


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