The online racing simulator
[Solved] Can't use single quote in functions.
Example: GetPlayerVar($user, 'NickName')

returns this error spammed in the lapper console window when started, and doesn't return anything in the ERR file:


Illegal character: <'> at line #1
Error: Illegal character. at line #1

An example as to why I would use ' instead of " is when nesting a GetPlayerVar into a string such as:


<?php 
$string 
"Hello,".GetPlayerVar($user'NickName')."!"
?>

I try not to use the same quote as the string itself for reasons that should be obvious (but apparently lapper doesn't care about it).
you cant use single quotes in functions , because every value will be returned in a string.

you could use single quotes, but you have too add those in the string itself. like the example below.


<?php 
privmsg
("Your Nickname: '".GetPlayerVar($userName,"NickName")."'!" );
?>

To use double quotes you have to use the '^t' to output a double quote.


<?php 
privmsg
("Your Nickname: ".GetPlayerVar($userName,"NickName")."^t qoute ^t qoute" );
?>

Attached images
nickname.jpg
Interesting.. well it doesn't really bother me that much since I got my code working. I will just jave to remember it haha.
This thread is closed

FGED GREDG RDFGDR GSFDG