Returning Strings
#4

Quote:
Originally Posted by TheLazySloth
View Post
What if I want the Value like for playerdata > Money ?
I suggest in that case you return it as a string too, then convert it to an integer where you actually need it. You can't return different datatypes in the same function.

Example:

pawn Code:
new Result[128], money;
Result = Load("serverdata", "money", "player"); // Store as a string

money = strval(Result); // Convert to integer
EDIT: Sorry didn't see your edit No problem
Reply


Messages In This Thread
Returning Strings - by TheLazySloth - 22.01.2012, 12:12
Re: Returning Strings - by Sinner - 22.01.2012, 12:27
Re: Returning Strings - by TheLazySloth - 22.01.2012, 12:31
Re: Returning Strings - by Sinner - 22.01.2012, 12:35
Re: Returning Strings - by TheLazySloth - 22.01.2012, 12:36

Forum Jump:


Users browsing this thread: 1 Guest(s)