Y_INI Problem
#1

PHP код:
File INI_Open(path);
name INI_String(File,"Nick");
reason INI_String(File,"Reason");
aname INI_String(File,"Banned_by");
date INI_String(File,"Date");
time INI_String(File,"Time");
format(msg,128,"Nick: %s | Banned by: %s | Reason: %s | Time: %s | Date: %s",name,aname,reason,time,date); 
And I get error: undefined symbol "INI_String" on all lines where INI_String is used. I need to get string values from those lines in File. File looks like:
Код:
[Ban Info]
Nick = [MG]Dimi
Banned_by = [MG]Dimi
Reason = Test
Date = 15:06:46
Time = 16.10.2011
Reply
#2

You need to specify a length.

PHP код:
File INI_Open(path);
name INI_String(File,"Nick",128);
reason INI_String(File,"Reason",128);
aname INI_String(File,"Banned_by",128);
date INI_String(File,"Date",128);
time INI_String(File,"Time",128);
format(msg,128,"Nick: %s | Banned by: %s | Reason: %s | Time: %s | Date: %s",name,aname,reason,time,date); 
Though if I might ask, why do you define new variables and declare them as others?
Reply
#3

1) Adding lenght wont work since its saying Undefined symbol, not "Number of arguments, does not match the definition"

2) Kinda easier for me
Reply
#4

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
1) Adding lenght wont work since its saying Undefined symbol, not "Number of arguments, does not match the definition"

2) Kinda easier for me
1) Wanna bet?

2) It's idiotic and a waste of space.
Reply
#5

Im reading

EDIT: here. I added lenght.
PHP код:
File INI_Open(path);
        
name INI_String(File,"Nick",25);
        
reason INI_String(File,"Reason",25);
        
aname INI_String(File,"Banned_by",25);
        
date INI_String(File,"Date",25);
        
time INI_String(File,"Time",25);
        
format(msg,128,"Nick: %s | Banned by: %s | Reason: %s | Time: %s | Date: %s",name,aname,reason,time,date);
        
INI_Close(File); 
Now it gives: D:\Server\filterscripts\LVGW_ADMIN_FS.pwn(1587) : error 029: invalid expression, assumed zero
D:\Server\filterscripts\LVGW_ADMIN_FS.pwn(1587) : error 035: argument type mismatch (argument 1)
D:\Server\filterscripts\LVGW_ADMIN_FS.pwn(1587) : error 001: expected token: ";", but found "return"
D:\Server\filterscripts\LVGW_ADMIN_FS.pwn(1587) : fatal error 107: too many error messages on one line

On each of these lines
Reply
#6

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
Im reading

EDIT: here. I added lenght.
PHP код:
File INI_Open(path);
        
name INI_String(File,"Nick",25);
        
reason INI_String(File,"Reason",25);
        
aname INI_String(File,"Banned_by",25);
        
date INI_String(File,"Date",25);
        
time INI_String(File,"Time",25);
        
format(msg,128,"Nick: %s | Banned by: %s | Reason: %s | Time: %s | Date: %s",name,aname,reason,time,date);
        
INI_Close(File); 
Now it gives: D:\Server\filterscripts\LVGW_ADMIN_FS.pwn(1587) : error 029: invalid expression, assumed zero
D:\Server\filterscripts\LVGW_ADMIN_FS.pwn(1587) : error 035: argument type mismatch (argument 1)
D:\Server\filterscripts\LVGW_ADMIN_FS.pwn(1587) : error 001: expected token: ";", but found "return"
D:\Server\filterscripts\LVGW_ADMIN_FS.pwn(1587) : fatal error 107: too many error messages on one line

On each of these lines
I'm assuming your attempting to create a stats system?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)