Returning a string
#2

Example:

pawn Code:
stock ExampleStock(auto)
{
    new stringer[56];
    if(auto == 1) { stringer = "Testing No.1"; }
    if(auto == 2) { stringer = "Testing No.2"; }
    if(auto == 3) { stringer = "Testing No.3"; }
    if(auto == 4) { stringer = "Testing No.4"; }
    return stringer;
}

If you was to do ExampleStock(2); - It would return the string "Testing No.2"
Reply


Messages In This Thread
Returning a string - by maramizo - 14.04.2011, 19:05
Re: Returning a string - by Kyle - 14.04.2011, 19:08
Re: Returning a string - by maramizo - 14.04.2011, 19:22
Re: Returning a string - by ~Yoshi - 14.04.2011, 19:25
Re: Returning a string - by Kyle - 14.04.2011, 19:26
Re: Returning a string - by maramizo - 14.04.2011, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)