AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Parse Problem (https://forums.alliedmods.net/showthread.php?t=246418)

Deathknife 08-17-2014 09:32

Parse Problem
 
szLineData[128]:
Code:

C 46 -684 36 254 -484 68
Code:


new fox[3][8];
new zox[3][8]
new type[1]
           
parse(szLineData, type, 1, fox[0], 7, fox[1], 7, fox[2], 7, zox[0], 7, zox[1], 7, zox[2], 7)

Printing out:
Code:

ColorChat(0, GREEN, "%s", szLineData)
:arrow:
Quote:

C 46 -684 36 254 -484 68
Code:

ColorChat(0, GREEN, "%s %s %s %s %s %s %s", type, fox[0], fox[1], fox[2], zox[0], zox[1], zox[2])
:arrow:
Quote:

C 46 -684 36 -484 68
zox[0] is empty, while it should be "254". Any ideas?

Nextra 08-17-2014 10:16

Re: Parse Problem
 
You have to make type two elements large to fit the null terminator. You should start using the charsmax macro.


All times are GMT -4. The time now is 13:00.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.