SA-MP Forums Archive
[HELP]: It cannot load to ongamemodeinit - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]: It cannot load to ongamemodeinit (/showthread.php?tid=355427)



[HELP]: It cannot load to ongamemodeinit - razol - 29.06.2012

-----


Re: [HELP]: It cannot load to ongamemodeinit - razol - 30.06.2012

Any help ?


Re: [HELP]: It cannot load to ongamemodeinit - ReneG - 30.06.2012

You're writing "Create3DTextLabel" among with paranthesis, and other separators.

When you're reading the line it reads as this (example).
Код:
Create3DTextLabel(%s,0x008080FF,%.4f,%.4f,%.4f,40.0,0,0);
sscanf sees "Create3DTextLabel", the paranthesis, the commas and doesn't know what to do, that's why the labels won't create. When you're writing, just write the raw values. Raw values as in the coordinates, and separate them only with a space.

Example

When writing
pawn Код:
format(szFileString, sizeof(szFileString), "%f %f %f", x, y, z);
When loading
pawn Код:
while(fread(file, szFileString))
{
    sscanf(szFileString, "fff", x, y, z);
    Create3DTextLabel(......);
}
offtopic, bump after 48 hours, and this problem has nothing to do with OnGameModeInit


Re: [HELP]: It cannot load to ongamemodeinit - razol - 30.06.2012

I understand, thanks for your help.