Whats the right way to do it?
#1

Whats the right way to do it i trying to do in only one line:
PHP код:
else if(vid >= 133 && vid <= 142) { if(org[playerid] != 7) return DontHaveKeys(playerid, "BALLAS"); } 
PHP код:
error 035: argument type mismatch (argument 2) 
To
PHP код:
forward DontHaveKeys(playerid, keysownersname); public DontHaveKeys(playerid, keysownersname) {
    new 
string[80];
    
format(string, sizeof(string), "You are not a %s so you cant turn on this car", keysownersname );
    
SendClientMessage(playerid, -1, string);
    return 
1;
} 
Reply
#2

answer is here
https://sampwiki.blast.hk/wiki/Keywords:...lisers#forward

PHP код:
forward MyPublicFunction(playerid, const string[]);
 
public 
MyPublicFunction(playerid, const string[])
{
} 
Reply
#3

Quote:
Originally Posted by maikons
Посмотреть сообщение
Whats the right way to do it i trying to do in only one line:
PHP код:
else if(vid >= 133 && vid <= 142) { if(org[playerid] != 7) return DontHaveKeys(playerid, "BALLAS"); } 
PHP код:
error 035: argument type mismatch (argument 2) 
To
PHP код:
forward DontHaveKeys(playerid, keysownersname); public DontHaveKeys(playerid, keysownersname) {
    new 
string[80];
    
format(string, sizeof(string), "You are not a %s so you cant turn on this car", keysownersname );
    
SendClientMessage(playerid, -1, string);
    return 
1;
} 
keysownersname is an integer and you put a string.
PHP код:
forward DontHaveKeys(playerid, keysownersname[MAX_PLAYER_NAME]); public DontHaveKeys(playerid, keysownersname[MAX_PLAYER_NAME]) {
    new 
string[80];
    
format(string, sizeof(string), "You are not a %s so you cant turn on this car", keysownersname );
    
SendClientMessage(playerid, -1, string);
    return 
1;
} 
Reply
#4

Thank you guys +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)