Script issue
#1

pawn Код:
public OnPlayerCommand ... blah blah ...

    if(strcmp(cmdtext, "/adminon", true) == 0) {                      // (549) : error 010: invalid function or declaration
    SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
    SetPlayerHealth(playerid, 9999999999.99);
    SetPlayerArmour(playerid, 9999999999.99);
    GivePlayerWeapon(playerid, 38, 999999999);
    }
    return 1;                                            //   (555) : error 010: invalid function or declaration
}

I dont get it ...
All of my other commands are totally in the same way ... and not pissing me off
but THIS one ...
Can any one help me out ?? ... this is so stupid !!!

...................
Reply
#2

I can only suggest that the commands before it are not finished properly. Also the return 1; is meat to be inside the brackets..

pawn Код:
if(strcmp(cmdtext, "/adminon", true) == 0)
    {      
    SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
    SetPlayerHealth(playerid, 9999999999.99);
    SetPlayerArmour(playerid, 9999999999.99);
    GivePlayerWeapon(playerid, 38, 999999999);
    return 1;
    }
Reply
#3

Quote:
Originally Posted by Weirdosport
I can only suggest that the commands before it are not finished properly. Also the return 1; is meat to be inside the brackets..

pawn Код:
if(strcmp(cmdtext, "/adminon", true) == 0)            // (549) : error 010: invalid function or declaration
    {    
    SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
    SetPlayerHealth(playerid, 9999999999.99);
    SetPlayerArmour(playerid, 9999999999.99);
    GivePlayerWeapon(playerid, 38, 999999999);
    return 1;                                // (555) : error 010: invalid function or declaration
    }
same man ...
Reply
#4

if(strcmp(cmdtext, "/adminon", true) == 0)

is not your problem, I tried it myself. Make sure that in the previous command the correct number of brackets are used..
Reply
#5

Quote:
Originally Posted by Weirdosport
if(strcmp(cmdtext, "/adminon", true) == 0)

is not your problem, I tried it myself. Make sure that in the previous command the correct number of brackets are used..
I just dont get it ...
...
All of my other commands are totally the same ...
and only this one fails ...
i tried editing it ... still the same
Reply
#6

ok ...
i tried switching places ....
now i get the same on the idiotic /kill command !!!
but the /adminon works. ...
what the hell ?
Reply
#7

Quote:
Originally Posted by Divine
ok ...
i tried switching places ....
now i get the same on the idiotic /kill command !!!
but the /adminon works. ...
what the hell ?
Hello Divine,

send us the command before and after the command your making, and then show us the error.
This way we can figure something out, and get somewhere.

Thank You,
Scott-Cameron
Reply
#8

Quote:
Originally Posted by deathdealer
Hello Divine,

send us the command before and after the command your making, and then show us the error.
This way we can figure something out, and get somewhere.

Thank You,
Scott-Cameron
oops
...........
pawn Код:
if(strcmp(cmdtext, "/kill", true) == 0)            // (549) : error 010: invalid function or declaration
{      
SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
SetPlayerHealth(playerid, 0.0);
}
return 1;                                // (554) : error 010: invalid function or declaration
}
.... /adminon works now .. i moved it infront of /kill .. now since /kill the last on the commandlist ..
its how I get it

Reply
#9

Hello,

I think it is because you have Return 1 after the braket, try this:

Код:
if(strcmp(cmdtext, "/kill", true) == 0)           
{      
SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
SetPlayerHealth(playerid, 0.0);
return 1;  
}                                 
if(strcmp(cmdtext, "/adminon", true) == 0) 
	{      
	SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
	SetPlayerHealth(playerid, 9999999999.99);
	SetPlayerArmour(playerid, 9999999999.99);
	GivePlayerWeapon(playerid, 38, 999999999);
	return 1; 
	}
I'm not to sure, if that will work but i will test it on my computer too.

Try it, and then post back.

Thank You,
Scott-Cameron
Reply
#10

Quote:
Originally Posted by deathdealer
Hello,

I think it is because you have Return 1 after the braket, try this:

Код:
if(strcmp(cmdtext, "/kill", true) == 0)          
{     
SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
SetPlayerHealth(playerid, 0.0);
return 1;  
}                                 
if(strcmp(cmdtext, "/adminon", true) == 0) 
{     
	SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
	SetPlayerHealth(playerid, 9999999999.99);
	SetPlayerArmour(playerid, 9999999999.99);
	GivePlayerWeapon(playerid, 38, 999999999);
	return 1; 
	}
I'm not to sure, if that will work but i will test it on my computer too.

Try it, and then post back.

Thank You,
Scott-Cameron
Intendation ftw..

pawn Код:
if(strcmp(cmdtext, "/adminon", true) == 0)
{      
    SendClientMessage(playerid, 0xF97804FF, "You Just God Admin Powers!");
    SetPlayerHealth(playerid, 9999999999.99);
    SetPlayerArmour(playerid, 9999999999.99);
    GivePlayerWeapon(playerid, 38, 999999999);
    return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)