View Single Post
Rowdy4E
Junior Member
Join Date: Nov 2018
Location: Czech Republic
Old 11-16-2018 , 14:59   Re: [HELP] Client Menu
Reply With Quote #10

Quote:
Originally Posted by SpirT View Post
So hi again. I diceded to do this...

PHP Code:
char path[512];
FormatEx(pathsizeof(path), "addons/sourcemod/configs/admin_simple.ini");
if (!
FileExists(path))
{
        
char steamid[32];
        
GetClientAuthId(clientAuthId_Steam2steamidsizeof(steamid));
        
OpenFile(path"r+"false);
        
WriteFileLine("%s" "20:ao", ... , steamid);
        
WriteFileLine(
                
PrintToChat(client"Congrats! VIP was given to %s!"clientname);

But i got some errors

Code:
error 035: argument type mismatch (argument 1)

warning 215: expression has no effect

error 029: invalid expression, assumed zero

error 029: invalid expression, assumed zero

fatal error 190: too many error messages on one line
How do i fix this?

Thanks for all your help and others as well!

Code should look like this:

PHP Code:
    char path[512];
    
BuildPath(Path_SMpathsizeof(path), "configs/admins_simple.ini");
    if (
FileExists(path)) 
    { 
        
char steamid[32]; 
        
GetClientAuthId(clientAuthId_Steam2steamidsizeof(steamid));
        
Handle file OpenFile(path"a");
        
WriteFileLine(file"\"%s\" \"20:ao\""steamid);
        
delete file;
        
        
PrintToChatAll("Congrats! VIP was given to %N!"client);
    } 

Last edited by Rowdy4E; 11-16-2018 at 15:02.
Rowdy4E is offline