Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Error when I try to create global void: function!

$
0
0
Hello guys, I'm trying to use my gamemode functions in every filterscript, so follow Y_Master's instruction, I made an include and did it like he said and I got errors, here is my code:
In my gamemode:
PHP Code:

global void:System_Scm(playeridmessage[], type){
    new 
string[128];
    switch(
type){
        case 
TYPE_NOTICE:{
            
format(stringsizeof(string), "{f4d742}*{FFFFFF} %s"message);
        }
        case 
TYPE_ERROR:{
            
format(stringsizeof(string), "{c60000}*{FFFFFF} "COL_FADE"%s"message);
        }
        case 
TYPE_SUCCESS:{
            
format(stringsizeof(string), "{01aa0f}*{FFFFFF} %s"message);
        }
    }
    
SendClientMessage(playerid, -1string);
    return 
1;


In my include:
PHP Code:

#define MASTER 6
#include <YSI\y_master>

foreign void:System_Scm(playeridmessagetype); 

Errors:
Quote:

In Gamemode:
./Functions.pwn(1832) : error 025: function heading differs from prototype
./Functions.pwn(1832) : error 025: function heading differs from prototype
./Functions.pwn(1832) : error 035: argument type mismatch (argument 2)
./Functions.pwn(1832) : fatal error 107: too many error messages on one line

Include:
error 079: inconsistent return types (array & non-array)

Viewing all articles
Browse latest Browse all 18226

Trending Articles